Question T9173
Visible to All Users

Clear checkbox disable

created 3 years ago (modified 3 years ago)

Hello !

I am using SurveyJS creator V2, and I have created a checkbox question with this list of answers:

  • Answer 1
  • Answer 2
  • None of these responses
  • Other:

I have managed to disable answers 1 and 2 when I select "None of these responses", but if they were already checked, then they are still recorded.

What are my options for not receiving these disabled responses?

Thank you!

Answers approved by surveyjs Support

created 3 years ago (modified 3 years ago)

Hello Antony,
If you have incorrect data for the survey, then you can correct them as the following:

JavaScript
survey.getAllQuestions().forEach(q => { if(q.getType() === "checkbox" && !q.isEmpty()) { if(q.value.indexOf("none") > -1) { q.value = "none"; } } });

Thank you,
Andrew
SurveyJS Team

    Other Answers

    created 3 years ago

    Problem solved, thanks for your help !

    Regards