How to get input from participants and use it as value.


Author
Message
kk1132
kk1132
Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)
Group: Forum Members
Posts: 7, Visits: 43
Hi all,

I am new to Inquisit programming and I was wondering how to get input from participants and use it as value. 
So, simply saying, at the beginning of the program, participants will be asked to input their name, and then they will see this as stimulus/values as the program goes on.

For example, 
at the beginning there will be text box where participants will be asked to type their name. (I think I can do this by using openended element?,,) Then, there will be page showing "Welcome XXX (whatever they typed in the box)." 
How would you code this?

I know this can be very simple and easy for you all. I am new to this and trying to get a sense of this. I have read the tutorial and tried to search any previous posts but still no good news. Once I know how this can be coded, I think I will be good to go further! I'd really appreciate it if you can help me with this! 


Thanks!

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
kk1132 - 3/20/2020
Hi all,

I am new to Inquisit programming and I was wondering how to get input from participants and use it as value. 
So, simply saying, at the beginning of the program, participants will be asked to input their name, and then they will see this as stimulus/values as the program goes on.

For example, 
at the beginning there will be text box where participants will be asked to type their name. (I think I can do this by using openended element?,,) Then, there will be page showing "Welcome XXX (whatever they typed in the box)." 
How would you code this?

I know this can be very simple and easy for you all. I am new to this and trying to get a sense of this. I have read the tutorial and tried to search any previous posts but still no good news. Once I know how this can be coded, I think I will be good to go further! I'd really appreciate it if you can help me with this! 


Thanks!

<block example>
/ trials = [1=enter_name; 2=welcome]
</block>

<values>
/ yourname = ""
</values>


<openended enter_name>
/ ontrialend = [
    values.yourname = openended.enter_name.response;
]
/ stimulusframes = [1=name_prompt]
/ position = (50%, 60%)
</openended>

<text name_prompt>
/ items = ("Please enter your name")
</text>

<trial welcome>
/ stimulusframes = [1=welcome_msg]
/ validresponse = (57)
</trial>

<text welcome_msg>
/ items = ("Welcome, <%values.yourname%>.")
</text>


kk1132
kk1132
Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)Associate Member (94 reputation)
Group: Forum Members
Posts: 7, Visits: 43
Dave - 3/20/2020
kk1132 - 3/20/2020
Hi all,

I am new to Inquisit programming and I was wondering how to get input from participants and use it as value. 
So, simply saying, at the beginning of the program, participants will be asked to input their name, and then they will see this as stimulus/values as the program goes on.

For example, 
at the beginning there will be text box where participants will be asked to type their name. (I think I can do this by using openended element?,,) Then, there will be page showing "Welcome XXX (whatever they typed in the box)." 
How would you code this?

I know this can be very simple and easy for you all. I am new to this and trying to get a sense of this. I have read the tutorial and tried to search any previous posts but still no good news. Once I know how this can be coded, I think I will be good to go further! I'd really appreciate it if you can help me with this! 


Thanks!

<block example>
/ trials = [1=enter_name; 2=welcome]
</block>

<values>
/ yourname = ""
</values>


<openended enter_name>
/ ontrialend = [
    values.yourname = openended.enter_name.response;
]
/ stimulusframes = [1=name_prompt]
/ position = (50%, 60%)
</openended>

<text name_prompt>
/ items = ("Please enter your name")
</text>

<trial welcome>
/ stimulusframes = [1=welcome_msg]
/ validresponse = (57)
</trial>

<text welcome_msg>
/ items = ("Welcome, <%values.yourname%>.")
</text>


Thank you Dave! This helped so much!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search