Question T240
Visible to All Users

Radiogroup: Checking/Unchecking

created 7 years ago

Hello! I want to administer a survey where none of the questions are required. If somebody selects an answer to a question, there is no way to de-select the response.

I found a way to de-select an answer using jQuery (http://jsfiddle.net/htragtrj/) but can't recreate using surveyjs.

Is there any way to do this?

Thanks!!

Answers

created 7 years ago

Hello,
Will this example work for you: https://surveyjs.io/Examples/Library/?id=survey-autonextpage&platform=jQuery?

Thank you,
Andrew

    Show previous comments (2)

      I have looked that example you said (many times!). Yeah, it's for checkboxes, but it's almost what I'm trying to achieve. But not.

      The jsfiddle example is whole, but it's using jquery to set/unset the properties of the selected choice. For a radio (one question): if the user clicks an answer choice, it is selected. If the user then click the SAME answer choice, it becomes UN-selected.

      Example.jpg

      First picture: default (no answers are selected). Second picture: The user selects 'Female' ('Female' is selected). Third picture: The user selects 'Female' again (since 'Female' was selected, the app DE-SELECTS 'Female,' effectively setting the question/responses to the default state).

      Thanks for your patience on this.

        Here is the example: https://plnkr.co/edit/3LZu1Z?p=preview

        Thank you,
        Andrew

          A widget. Huh.

          That is exactly it, though. You rock!

          Thanks very much for your help!!