Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Yes/No Question type issue

  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 9 months ago #156967 by MadhuraBL
Yes/No Question type issue was created by MadhuraBL
Hi, I have a survey with a number of Yes/No Question type, which are not mandatory. When I open the survey, all the Yes/No questions have options "Yes", "No" and "Leave blank" with "Leave blank" selected by default.

Issue is, when I click on any other option (Yes or No) and then click on "Leave blank" option, it does not select Leave blank again. This is happening with all the Yes/No questions.

Any suggestion with this would be of great help, Thanks
The topic has been locked.
  • MadhuraBL
  • MadhuraBL's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 9 months ago - 6 years 9 months ago #156968 by MadhuraBL
Replied by MadhuraBL on topic Yes/No Question type issue
Hi, I figured out the cause for this issue, this survey uses a custom template where in there is some code written to change "No answer" label to "Leave blank". This is in scripts/template.js, the code used is as below:

//Function to set "No answer" to "Leave blank" in questions that are not mandatory
$(document).ready(function() {
// For radio buttons
$('.no-anwser-item .label-text').text('Leave blank')

// For yes-no questions
$('.btn.btn-primary:nth-child(3)').html('Leave blank');

});


But don't know what to change here! Tried removing the last line, works fine(lets me select No answer option back) But with this line, it does not let me select back "Leave blank" option.

Please help!
Thanks
Last edit: 6 years 9 months ago by MadhuraBL.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose