- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Remove answer options in array
- elseeising
- Topic Author
- Offline
- New Member
Less
More
4 years 4 months ago #190836
by elseeising
Remove answer options in array was created by elseeising
I have an array question where for some subquestions I would like to have the answer option "Not applicable", but I don't want this answer to be available for all subquestions.
I use LimeSurvey version 3.19.2
I already tried to add the following in the custom.css (adapted from the code to remove a textbox from a multiple questions with comments), but it is not working.
#answer979374X39885X567571SQ001-A6 {display: none;}
What am I doing wrong?
Thanks a lot!
I use LimeSurvey version 3.19.2
I already tried to add the following in the custom.css (adapted from the code to remove a textbox from a multiple questions with comments), but it is not working.
#answer979374X39885X567571SQ001-A6 {display: none;}
What am I doing wrong?
Thanks a lot!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
4 years 4 months ago #190838
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Remove answer options in array
Hiding the radio input will still allow it to be selected via the keyboard. You would be better off removing it with JavaScript (and you will also want to remove the associated label).
Place something like this in the question source:
Sample survey attached:
Place something like this in the question source:
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Remove the answer options $('#answer{SGQ}SQ001-A6, label[for="answer{SGQ}SQ001-A6"]').remove(); }); </script>
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- elseeising
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
4 years 4 months ago #190845
by elseeising
Replied by elseeising on topic Remove answer options in array
Yes, that did the trick; thank you so much!
The topic has been locked.