Millisecond Forums

branching with radio buttons

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

By kkm128 - 3/17/2009

Hi,


I am attempting to conduct a survey with a question that branches using radio buttons. I have copied the script of the one question that I wish to branch. The question seems to branch, but it always goes to one page and ignores the response.


<radiobuttons partydemrepind>


/caption = "Generally speaking, do you usually think of yourself as a Republican, a Democrat or an Independent."


/options = (


"Republican"


"Democrat"


"Independent")


</radiobuttons>



<radiobuttons republican>


/caption = "Do you consider yourself a strong, moderate or weak Republican?"


/options = (


"Strong"


"Moderate"


"Weak")


/required = false


</radiobuttons>



<radiobuttons democrat>


/caption = "Do you consider yourself a strong, moderate or weak Democrat?"


/options = (


"Strong"


"Moderate"


"Weak"


/required = false


</radiobuttons>



<surveypage page 1>


/caption = " "


/font style = ("Verdana", -14, true, false, false, false, 5, 0)


/questions = [1=partydemrepind]


/branch = [if (radiobuttons.partydemrepind.response = "Republican") surveypage.republican]


/branch = [if (radiobuttons.partydemrepind.response = "Democrat") surveypage.democrat]


</surveypage>



<surveypage republican>


/caption = " "


/fontstyle = ("Verdana", -14, true, false, false, false, 5, 0)


/questions = [1=republican]


</surveypage>



<surveypage democrat>


/caption = " "


/ fontstyle = ("Verdana", -14, true, false, false, false, 5, 0_


/questions = [1=democrat]


</surveypage>



<survey politics>


/ pages = [1=page1]


/responsefontstyle = ("Verdana," -14, false, false, false, 5, 0)


/fontstyle = ("Verdana", -14, false, false, false, 5, 0)


/itemspacing = 2%


/showpagenumbers = false



Thanks for your help! :-)


Kelly

By IvoR - 3/18/2009

Hey Kelly,

I've looked at your script and altered it a bit. You can find it in the attachment to this post.

Good luck with it!

Ivor

By chmo - 6/30/2009

Hi IvoR,


I'm actually looking for that exact script.  Could you possibly copy and paste it into your message? For some reason, when I click on the attachment, I don't see anything.


Thank you so much!


By IvoR - 6/30/2009

Hey Chmo,

I've also tried to open the script, but it didn't seem te work... maybe because of the forum update?

But I've constructed the script again:


<radiobuttons partydemrepind>


/caption = "Generally speaking, do you usually think of yourself as a Republican, a Democrat or an Independent."


/options = (


"Republican"


"Democrat"


"Independent")


</radiobuttons>


<radiobuttons republican>


/caption = "Do you consider yourself a strong, moderate or weak Republican?"


/options = (


"Strong"


"Moderate"


"Weak")


/required = false


</radiobuttons>


<radiobuttons democrat>


/caption = "Do you consider yourself a strong, moderate or weak Democrat?"


/options = (


"Strong"


"Moderate"


"Weak")


/required = false


</radiobuttons>


<surveypage page1>


/caption = " "


/responsefontstyle = ("Verdana," -14)


/questions = [1=partydemrepind]


</surveypage>


<surveypage republican>


/caption = " "


/responsefontstyle = ("Verdana," -14)


/questions = [1=republican]


/skip = [radiobuttons.partydemrepind.response == "Democrat"]


</surveypage>


<surveypage democrat>


/caption = " "


/responsefontstyle = ("Verdana," -14)


/questions = [1=democrat]


/skip = [radiobuttons.partydemrepind.response == "Republican"]


</surveypage>


<survey politics>


/pages = [1=page1;2=republican;3=democrat]


/responsefontstyle = ("Verdana," -14)


/itemspacing = 2%


/showpagenumbers = false


</survey>


<expt survey>


/blocks = [1=politics]


</expt>


Hopes this helpes!

IvoR

By seandr - 7/2/2009

The problem was indeed due to upgrading the site. It's fixed now so you can download the script attachment.


-Sean

By chmo - 7/3/2009

Thank you so much for this!