Remove answer options in array

1 year 3 weeks ago #190836 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!
The topic has been locked.
LimeSurvey Partners
1 year 3 weeks ago #190838 by tpartner
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:

<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();

Sample survey attached:

File Attachment:

File Name: limesurvey...1-08.lss
File Size:19 KB

Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner -
The topic has been locked.
1 year 3 weeks ago #190845 by elseeising
Yes, that did the trick; thank you so much!
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now