- Posts: 10
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Can I disable some fields within an array (Matrix)
8 years 10 months ago - 8 years 10 months ago #108058
by SvenF
Can I disable some fields within an array was created by SvenF
Hi,
I have to do an array question but not all questions have the same number of results.
It should look like this for example:
At question2 there should only 1 and 3 being selectable within the array.
Is this possible or must I do separate questions?
I have to do an array question but not all questions have the same number of results.
It should look like this for example:
1 | 2 | 3 | 4 | |
question1 | X | X | X | X |
question2 | X | X | ||
question3 | X | X | X | X |
At question2 there should only 1 and 3 being selectable within the array.
Is this possible or must I do separate questions?
Last edit: 8 years 10 months ago by SvenF.
The topic has been locked.
8 years 10 months ago - 8 years 10 months ago #108074
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 Can I disable some fields within an array
Assuming you are using a normal array question...
You can use JavaScript/jQuery to hide some of the radio inputs.
Set up your survey to use JavaScript and add a script like below to the question source. This will hide the sixth and eighth radios in the question.
You can use JavaScript/jQuery to hide some of the radio inputs.
Set up your survey to use JavaScript and add a script like below to the question source. This will hide the sixth and eighth radios in the question.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { $('#question{QID} input.radio:eq(5)').hide(); $('#question{QID} input.radio:eq(7)').hide(); }); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 10 months ago by tpartner.
The topic has been locked.
8 years 10 months ago #108104
by SvenF
Replied by SvenF on topic Can I disable some fields within an array
Works fine - thank you
The topic has been locked.
2 years 9 months ago #201503
by SvenF
Replied by SvenF on topic Can I disable some fields within an array (Matrix)
We are now using Lime Survey Pro Hosting. Is it differrent to hide some parts of the matrix? I used the same code as above. JS is running wenn I test with "alert('bla')" but the radios did not hide.
The topic has been locked.
2 years 9 months ago #201515
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Can I disable some fields within an array (Matrix)
It is the same as with Limesurvey CE. But the solution presented here is most probably not for the version LS 3.x LTS, but probably for LS 2.06 LTS or LS 2.7x, given that this is a 6 year old thread!
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
2 years 9 months ago #201526
by SvenF
Replied by SvenF on topic Can I disable some fields within an array (Matrix)
Ok - I know this is my old tread.
We use now LimeSurvey Professional Version 3.22.20. Is ist not possible with this version or can I use another solution?
We use now LimeSurvey Professional Version 3.22.20. Is ist not possible with this version or can I use another solution?
The topic has been locked.