Is there a way to auto-check an ‘Other’ checkbox option when a respondent types in the option?

0

As a bit of a background – we are trying to set up a survey where we want to ask the respondent an unaided question about which stores they have shopped at, and then using those answers to pipe into subsequent questions. We tried using textboxes, but since we can’t base logic off of them, we avoided using that (we don’t want to pipe blank answers through the survey). 

 

One option that I found was to set the question up as a checkbox question, but each answer option would actually be an ‘other’ textbox. That way, we can add logic to only show the option if it is answered. The downfall is that the person can tab over to the next textbox without actually checking the answer, which means that the answer isn’t registered. Is there a way to automatically have the checkbox checked if the respondent types something in? Or are there any other workarounds to this that anyone could suggest?

 

Thanks so much!

Lola Gill answered
    0
    Lola Gill 6.84K Rep.

    I have a script that checks a checkbox if you tab into the other text field:

    $SG(document).ready(function(){
    $SG(“#sgE-xxxxx-x-x-xxxxx-other”).focus(function(){
    $SG(“#sgE-xxxxx-x-x-xxxxx”).click();
    });
    });

    You would need to replace all of the x’s above with the appropriate element ID’s. This document should help track those down:

    https://help.surveygizmo.com/help/article/link/how-to-find-element-ids-to-use-with-javascript

    I’m still pretty new to scripting (so there is probably a more efficient way of doing this), but I thought I would share this in case it helps!

    Lola Gill answered
      ×

      Login

      Question stats

      • Active
      • Views1243 times
      • Answers1 answer
      • Followers0 followers