How to branch based on RadioGroup selection
Yep it feels like a silly question but I can't seem to access and test, in an IF statement which RadioGroup option is selected.
=$form1.state.radioGroup1.selectedIndex = 1
doesn't work!
-
Hello Robert,
The Designer users Javascript syntax so in order to check for equality, use the '==' operator. Also, you might want to consider checking the value of radiogroup instead.
Thanks, Stefan
0 -
"checking the value of radiogroup instead." by that you mean??????
0 -
syntax example please...
thanks you are being great, pity we work at different times of the day 😄
0 -
No problem! :)
=$form1.state.radioGroup1.value
This corresponds to the value field that is configured for the particular radio button item.
0 -
Oh Ok you you really do make me feel stupid, I know to you that t's all simple but this javascript stuff is really a foreign language to me.
What does my test in the IF look like. I have 2 options in the RadioGroup
0 -
it failed when I replaced
=$form1.state.radioGroup1.selectedIndex = 1
for
=$form1.state.radioGroup1.value == 1
0 -
The syntax is correct in the second statement. The number on the right side of the statement should correspond to the value that you've configured in the radio group for the individual radio buttons. As an example, if you set the radio button's Value to next, then the syntax in the If statement would be =$form1.state.radioGroup1.value == "next"
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
7 commentaires