Have an idea?

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

Pre-select Grid question options

I am seeking to use SSI_SetSelect to pre-select options in a Grid question

Following the suggestion at

I have this code in the footer of my grid question [called “retain”]:
<script type="text/javascript">
  SSI_SetSelect("retain_r1_c1", true);
  SSI_SetSelect("retain_r2_c1", true);

to pre-select the first option in rows 1 & 2.

But this doesn’t work - no options are pre-selected on the page
I have tried various formulations.

I created a Select question called “test” to check I could get pre-selection functioning for that.
This worked fine (pre-selecting option 2):
<script type="text/javascript">
 SSI_SetSelect("test_2", true);

So any idea why the code isn’t working for the Grid question?

asked Nov 13, 2015 by dan r Bronze (1,550 points)

1 Answer

0 votes
You are using the correct script to pre-select but you may be referencing your question incorrectly. I tested a whole bunch of variations (select and grids) and got them all working.

You got the select question working okay as you mentioned so that's a good start. Now onto grids.

If you are referencing a single response grid (radio buttons), be careful of your grid direction and use this ...
Q3_r1_10 or Q10_c5_4

If you are referencing a multiple response grid (check boxes), use this ...
Q10b_r19_c3 or Q2a_r6_c13

I feel you are almost there. Just get the question part right.
answered Nov 13, 2015 by Paul Moon Platinum (57,115 points)
Thanks Paul, sorted now.

I needed:


thanks again
Yes Dan, my suspicions were correct. All part of the learning curve my friend. Glad to see you have it working.