- Posts: 40
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Disable one checkbox in numeric array with checkboxes
- Ryuniri_44052
- Topic Author
- Offline
- Banned
Less
More
8 years 5 months ago #128026
by Ryuniri_44052
Disable one checkbox in numeric array with checkboxes was created by Ryuniri_44052
Hey LimeSurvey experts,
do you know a script, to disable a single checkbox in a multiple choice question or in a array (numbers) with checkboxes. I would like to use the array style, because it is much shorter and more intuitive for my question. But for one line, one answering option (column) is impossible. So It would be very nice to disable it by script.
Long time ago I read something here in the forum, that makes me believe it is possible - but unfortunatily I can't find it anymore.
do you know a script, to disable a single checkbox in a multiple choice question or in a array (numbers) with checkboxes. I would like to use the array style, because it is much shorter and more intuitive for my question. But for one line, one answering option (column) is impossible. So It would be very nice to disable it by script.
Long time ago I read something here in the forum, that makes me believe it is possible - but unfortunatily I can't find it anymore.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10103
- Thank you received: 3591
8 years 5 months ago #128052
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 Disable one checkbox in numeric array with checkboxes
Have a look at this thread -
www.limesurvey.org/en/forum/can-i-do-thi...filter-in-sub-answer
. (you will need to replace all instances of "input.radio" with "input[type="checkbox"]")
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Ryuniri_44052
- Topic Author
- Offline
- Banned
Less
More
- Posts: 40
- Thank you received: 0
8 years 5 months ago #128141
by Ryuniri_44052
Replied by Ryuniri_44052 on topic Disable one checkbox in numeric array with checkboxes
Thank you very much!
I wasn't able to adapt the following script by changing "input.radio" to "input[type="checkbox"]", but I adapted the last line and changed the specific "code" of the radio-button in the last line to my checkbox.
My changes (oriented on last line in the script above):
I wasn't able to adapt the following script by changing "input.radio" to "input[type="checkbox"]", but I adapted the last line and changed the specific "code" of the radio-button in the last line to my checkbox.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ //Hide the last radio in the first row $('#question'+{QID}+' tr.answers-list:first input.radio:last').hide(); //Hide the 3rd radio in the 3rd row $('#question'+{QID}+' tr.answers-list:eq(2) input.radio:eq(2)').hide(); //Hide the first radio of Option 4 $('#answer433587X129X10164-1').hide(); }); </script>
My changes (oriented on last line in the script above):
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ //Hide what ever you want by adding the code of your interactive element $('#cbox_585145X141X34956_1').hide(); }); </script>
The topic has been locked.