Have an idea?

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

Other specify in combo box


My query is same as the below link contains but for drop down list.


I have 21 options under drop down menu, the other specify text box should appear only if the last option 'other' is selected. I have created free format question for combo box and other specify text box. I need to hide the text box and it should appear once option 'other' is selected. Please help me by editing the code available in the above link to work for free format question.

Variable name: Q4_A
Text box: Q4_OE

Please help me. Let me know in case of any questions.
asked Sep 6, 2018 by Abdul Bronze (2,745 points)

1 Answer

+1 vote
Best answer
Try adding this JS to your free format question:

    $('#[% QuestionName() %]_A').change(function(){
        $('#[% QuestionName() %]_OE').toggle(SSI_GetValue('[% QuestionName() %]_A') == 21);
    $('#[% QuestionName() %]_A').change();

Optional JS verification:

if (SSI_GetValue('[% QuestionName() %]_A') == 21 && !SSI_GetValue('[% QuestionName() %]_OE')) {
    strErrorMessage = 'Error message.';
answered Sep 6, 2018 by Zachary Platinum Sawtooth Software, Inc. (150,850 points)
selected Sep 6, 2018 by Abdul
It is perfect Zachary. Thanks you so much.