Millisecond Forums

Randomizing order of appearance of radiobuttons /options

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

By EN - 6/10/2025

Hello,
I'm wondering if there is an easy way to randomize the order in which the /options in a radiobuttons element appear on screen?
For instance, in the sample code below, the /options always appear in the same order from left to right, "opt1", "opt2" and "opt3".
I would like to randomize that.
Any help would be greatly appreciated.
Best regards,
EN
--
<surveypage att_check1>
/caption = "CAPTION surveypage"
/questions = [1-1=noreplace(att_check1_1)]
/ itemfontstyle = ("Arial", 2.00%, false, false, false, false, 5, 1)
/ itemspacing = 1.0%
/ showpagenumbers = false
/ showbackbutton = false
/ showquestionnumbers = false
/ responsefontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1)
</surveypage>

<radiobuttons att_check1_1>
/ caption="<b>CAPTION radiobuttons1 </b>"
/ options=("opt1", "opt2", "opt3")
/ optionvalues = ("0", "1", "2")
/ required = true
/ orientation = horizontalequal
</radiobuttons>
By Dave - 6/11/2025

EN - 6/11/2025
Hello,
I'm wondering if there is an easy way to randomize the order in which the /options in a radiobuttons element appear on screen?
For instance, in the sample code below, the /options always appear in the same order from left to right, "opt1", "opt2" and "opt3".
I would like to randomize that.
Any help would be greatly appreciated.
Best regards,
EN
--
<surveypage att_check1>
/caption = "CAPTION surveypage"
/questions = [1-1=noreplace(att_check1_1)]
/ itemfontstyle = ("Arial", 2.00%, false, false, false, false, 5, 1)
/ itemspacing = 1.0%
/ showpagenumbers = false
/ showbackbutton = false
/ showquestionnumbers = false
/ responsefontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1)
</surveypage>

<radiobuttons att_check1_1>
/ caption="<b>CAPTION radiobuttons1 </b>"
/ options=("opt1", "opt2", "opt3")
/ optionvalues = ("0", "1", "2")
/ required = true
/ orientation = horizontalequal
</radiobuttons>

Yes, there is:

<radiobuttons att_check1_1>
/ caption="<b>CAPTION radiobuttons1 </b>"
/ options=("opt1", "opt2", "opt3")
/ optionvalues = ("0", "1", "2")
/ required = true
/ orientation = horizontalequal
/ order = random // see documentation: https://www.millisecond.com/support/docs/current/html/language/attributes/order.htm
</radiobuttons>


By EN - 6/11/2025

Dave - 6/11/2025
EN - 6/11/2025
Hello,
I'm wondering if there is an easy way to randomize the order in which the /options in a radiobuttons element appear on screen?
For instance, in the sample code below, the /options always appear in the same order from left to right, "opt1", "opt2" and "opt3".
I would like to randomize that.
Any help would be greatly appreciated.
Best regards,
EN
--
<surveypage att_check1>
/caption = "CAPTION surveypage"
/questions = [1-1=noreplace(att_check1_1)]
/ itemfontstyle = ("Arial", 2.00%, false, false, false, false, 5, 1)
/ itemspacing = 1.0%
/ showpagenumbers = false
/ showbackbutton = false
/ showquestionnumbers = false
/ responsefontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1)
</surveypage>

<radiobuttons att_check1_1>
/ caption="<b>CAPTION radiobuttons1 </b>"
/ options=("opt1", "opt2", "opt3")
/ optionvalues = ("0", "1", "2")
/ required = true
/ orientation = horizontalequal
</radiobuttons>

Yes, there is:

<radiobuttons att_check1_1>
/ caption="<b>CAPTION radiobuttons1 </b>"
/ options=("opt1", "opt2", "opt3")
/ optionvalues = ("0", "1", "2")
/ required = true
/ orientation = horizontalequal
/ order = random // see documentation: https://www.millisecond.com/support/docs/current/html/language/attributes/order.htm
</radiobuttons>



Nice. Thanks, as usual, Dave!
With verb best wishes,
EN