Yes/No Question type issue

More
3 months 3 days ago #156967 by MadhuraBL
MadhuraBL created the topic: Yes/No Question type issue
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

Please Log in to join the conversation.

More
3 months 3 days ago - 3 months 3 days ago #156968 by MadhuraBL
MadhuraBL replied the 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: 3 months 3 days ago by MadhuraBL.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now