Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Using different radio buttons and check boxes within the same survey

I haven't had this issue come up before, but here we go ...

Can I use different radio buttons and check boxes within the same survey?

I have 2 survey types within the one survey and I would ideally like to use red radio buttons and check boxes for Survey 1 and blue for Survey 2.

The survey type is controlled via a Merged Field called "RType".

I thought if I went in to Settings | General Settings | Respondent Input and inserted some Perl Script into the "Selected" options for radio buttons and check boxes, that would work.

I inserted this Perl script for the radio buttons ...
[%Begin Unverified Perl 

 my $RBSelectType="";
  
 if (VALUE("RType")==1)
  {  
   $RBSelectType="radiobutton_selected1.png";
  }
 else
  {  
   $RBSelectType="radiobutton_selected2.png";
  }
  
 return $RBSelectType;

End Unverified%]

It didn't work? When I clicked on any of the answer options in a select question, the whole check box or radio button disappeared?

Is this a path issue?

Any help will be greatly appreciated. Thank you.
asked May 6 by Paul Moon Platinum (80,455 points)
Do you need to prepend those image files with a call to GraphicsPath?
Thanks Zachary for pointing me in the right direction. When I was writing this post at 2am in the morning, I said in the post is this a pathing issue? I assumed it would look under the correct folder. Wrong!

I just added [%GraphicsPath()%] to the script and copied the radio button and check box files to the graphics folder and it worked like a charm.

Appreciate the help as always buddy.

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.
...