- Posts: 962
- Thank you received: 216
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array with some cells disabled
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
7 years 11 months ago - 7 years 11 months ago #134433
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Array with some cells disabled was created by tammo
I would like to use an multi-flex-text array with numbers only and disable certain cells.
My Javascript/JQuery capacities are too low, so I would kindly ask one of the gurus to guide me in the right direction.
I hope the attached image tells all. Using 2.50 built 160411
My Javascript/JQuery capacities are too low, so I would kindly ask one of the gurus to guide me in the right direction.
I hope the attached image tells all. Using 2.50 built 160411
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Attachments:
Last edit: 7 years 11 months ago by tammo. Reason: Earlier image not applicable
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 11 months ago #134439
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 Array with some cells disabled
Hi Tammo, do you want the inputs just disabled (greyed-out) or completely removed?
Can you attach a sample survey containing that question?
Can you attach a sample survey containing that question?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 962
- Thank you received: 216
7 years 11 months ago #134443
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Array with some cells disabled
Hi tpartner,
see attachment.
There is an additional wish too: I would like the total of the third question to equal the answer of the second question. Only after that the third question has been answered right.
Example: second question = 56.8
Thanks in advance, this will be my (well, actually your) first Javascript in version 2.5!
Tammo
see attachment.
There is an additional wish too: I would like the total of the third question to equal the answer of the second question. Only after that the third question has been answered right.
Example: second question = 56.8
Thanks in advance, this will be my (well, actually your) first Javascript in version 2.5!
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 962
- Thank you received: 216
7 years 11 months ago #134444
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Array with some cells disabled
@tpartner: Preferably greyed out, but I would also like to know how to remove them completely...
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
7 years 11 months ago #134446
by jelo
Cannot see that sample survey anywhere?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Array with some cells disabled
Do you mean the png image? Or did you attached a sample survey as tpartner asked for?tammo wrote: see attachment.
Cannot see that sample survey anywhere?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: tammo
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 962
- Thank you received: 216
7 years 11 months ago #134448
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Array with some cells disabled
Attachment
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
7 years 11 months ago #134454
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Array with some cells disabled
Quick test using jquery and EM
In question text
Update SQ01 and SQ01 to needed line and column (i never remind if X is first and Y seconc, i think it answer{SQG}SY01_SX01 but unsure.
I don't really understand your second need : but i think it can be done with EM and manual.limesurvey.org/Question_type_-_Ar...28em_validation_q.29
In question text
Code:
<script> $(function() { $("answer{SQG}SQ01_SQ01").prop('disabled',true); }); </script>
I don't really understand your second need : but i think it can be done with EM and manual.limesurvey.org/Question_type_-_Ar...28em_validation_q.29
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: tammo
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 11 months ago #134455
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 Array with some cells disabled
Note that disabling will not work with a mandatory question.@tpartner: Preferably greyed out, but I would also like to know how to remove them completely
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: tammo
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 11 months ago #134462
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 Array with some cells disabled
To avoid confusion, I would change the sub-question codes to reflect the scale. So, something like X1-X15 and Y1-Y4.
Then Denis' script could be:
And, to address your second requirement, the question validation equation could be:
Then Denis' script could be:
Code:
<script> $(function() { $("#answer{SGQ}Y1_X1").prop('disabled',true); }); </script>
And, to address your second requirement, the question validation equation could be:
Code:
sum(that.FTE1.sq_Y2) == sum(that.FTE1.sq_Y3)
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 962
- Thank you received: 216
7 years 11 months ago #134464
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Array with some cells disabled
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 962
- Thank you received: 216
7 years 10 months ago #135353
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Array with some cells disabled
This works very well for an array with texts (where only numbers are allowed).
I now also have another array: array with numbers, checkbox layout. Here the trick does not work.
Anyone knows how to get this working?
I now also have another array: array with numbers, checkbox layout. Here the trick does not work.
Anyone knows how to get this working?
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 10 months ago #135358
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 Array with some cells disabled
Try this:
Code:
<script> $(function() { $("#cbox_{SGQ}Y1_XA").prop('disabled',true); }); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: tammo
The topic has been locked.