Remove answer options in array

More
1 month 2 days 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!

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 month 2 days 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();
	});
</script>

Sample survey attached:

File Attachment:

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

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Attachments:

Please Log in or Create an account to join the conversation.

More
1 month 2 days ago #190845 by elseeising
Yes, that did the trick; thank you so much!

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!