Populating Question 2 with response to Question 1


Populating Question 2 with response to Question 1

Author
Message
mb194503
mb194503
New Member
New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)

Group: Forum Members
Posts: 4, Visits: 6
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
Dave
Dave
Supreme Being
Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)Supreme Being (589K reputation)

Group: Administrators
Posts: 9.4K, Visits: 42K
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>


mb194503
mb194503
New Member
New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)New Member (12 reputation)

Group: Forum Members
Posts: 4, Visits: 6
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
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search