Populating Question 2 with response to Question 1


Author
Message
mb194503
mb194503
Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)
Group: Forum Members
Posts: 7, Visits: 21
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 (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
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
Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)Respected Member (350 reputation)
Group: Forum Members
Posts: 7, Visits: 21
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

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search