Millisecond Forums

Populating Question 2 with response to Question 1

https://forums.millisecond.com/Topic26804.aspx

By mb194503 - 4/15/2019

I am running into difficulties coding a set of questions in Inquisit 4. The first question asks participants their political affiliation (Democrat, Republican, Independent, Other). I then want two things to occur: 

1) I would like their response to this question to then populate the follow-up question: Would you call yourself a Strong <% response %> or a Not very strong <% response %>. 

2) I would like this question to only appear for those who responded with Democrat or Republican to the first question, and not to appear for those who responded Independent or Other. 

Suggestions on how I could make these statements appear under these conditions? 

Thanks-MB
By Dave - 4/15/2019

mb194503 - Monday, April 15, 2019
I am running into difficulties coding a set of questions in Inquisit 4. The first question asks participants their political affiliation (Democrat, Republican, Independent, Other). I then want two things to occur: 

1) I would like their response to this question to then populate the follow-up question: Would you call yourself a Strong <% response %> or a Not very strong <% response %>. 

2) I would like this question to only appear for those who responded with Democrat or Republican to the first question, and not to appear for those who responded Independent or Other. 

Suggestions on how I could make these statements appear under these conditions? 

Thanks-MB

This should be pretty straightforward actually:

<block myblock>
/ trials = [1=pg1]
</block>

<surveypage pg1>
/ questions = [1=political_affiliation]
/ branch = [if (radiobuttons.political_affiliation.response == "Democrat" || radiobuttons.political_affiliation.response == "Republican") surveypage.pg1a]
</surveypage>

<surveypage pg1a>
/ questions = [1=pa_strength]
</surveypage>

<radiobuttons political_affiliation>
/ caption = "Your political affiliation:"
/ options = ("Democrat", "Republican", "Independent", "Other")
</radiobuttons>

<radiobuttons pa_strength>
/ caption = "Would you consider yourself a strong <%radiobuttons.political_affiliation.response%> or not a very strong <%radiobuttons.political_affiliation.response%>?"
/ options = ("Very Strong", "Strong", "Not very Strong")
</radiobuttons>

By mb194503 - 4/15/2019

Dave - Monday, April 15, 2019
mb194503 - Monday, April 15, 2019
I am running into difficulties coding a set of questions in Inquisit 4. The first question asks participants their political affiliation (Democrat, Republican, Independent, Other). I then want two things to occur: 

1) I would like their response to this question to then populate the follow-up question: Would you call yourself a Strong <% response %> or a Not very strong <% response %>. 

2) I would like this question to only appear for those who responded with Democrat or Republican to the first question, and not to appear for those who responded Independent or Other. 

Suggestions on how I could make these statements appear under these conditions? 

Thanks-MB

This should be pretty straightforward actually:

<block myblock>
/ trials = [1=pg1]
</block>

<surveypage pg1>
/ questions = [1=political_affiliation]
/ branch = [if (radiobuttons.political_affiliation.response == "Democrat" || radiobuttons.political_affiliation.response == "Republican") surveypage.pg1a]
</surveypage>

<surveypage pg1a>
/ questions = [1=pa_strength]
</surveypage>

<radiobuttons political_affiliation>
/ caption = "Your political affiliation:"
/ options = ("Democrat", "Republican", "Independent", "Other")
</radiobuttons>

<radiobuttons pa_strength>
/ caption = "Would you consider yourself a strong <%radiobuttons.political_affiliation.response%> or not a very strong <%radiobuttons.political_affiliation.response%>?"
/ options = ("Very Strong", "Strong", "Not very Strong")
</radiobuttons>


Thank you, that worked! I did not realize that the radiobuttons component needed to be added to the caption for the second question. --MB