Have an idea?

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

Disabling response options within rows in a grid

I have a grid question.  There are 7 rows.  The first column is a label, the second column has a text box, the third and fourth columns have a radio button.

If a user enters text in the box, the radio buttons in that same row need to be disabled.  Conversely, if the user clicks on a radio button, the text box and the second radio button in that same row need to be disabled.

Each of the 7 rows needs to function this way independently.

In addition, can I limit the text (which is just a single letter) to A-N only?

Thanks for any help!
asked Oct 7, 2014 by RhondaDick (180 points)
retagged Oct 7, 2014 by Walter Williams
Just a comment - all of your problems will be solved using some fancy JavaScript code. I'm not a JavaScript wizard like some of the forum users.

Regarding your text box restrictions, you should size the text box to represent 1 letter and set the maximum number of characters to "1". The "A-N" input will also be controlled by JavaScript.

If you are struggling to solve your problem, email Support@SawtoothSoftware.com.

1 Answer

0 votes
Hi,

For this you need to know the Id of that field then you can write below script in footer of that question:
<script type="text/javascript">
$("#B3_r5_c1").attr('disabled', true);
</script>
so you need to write your own logic that if radio button is clicked then "<script type="text/javascript">
$("#B3_r5_c1").attr('disabled', true);
</script>
after that in  text field key up function you can write the below code:
$(".grid_c2.B3_r5_c2").removeClass("clickable");
answered Dec 5, 2014 by Neelima
...