- Posts: 13910
- Thank you received: 2546
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array question with answers in dropdown boxes
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
7 years 8 months ago #137953
by DenisChenu
I can not reproduce the issue : then need tester.
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 question with answers in dropdown boxes
See github.com/SondagesPro/LS-arrayTextAdapt...suecomment-223626556Juanoche wrote:
DenisChenu wrote: Hi,
Actually for such solution : you have a plugin : www.limesurvey.org/forum/plugins/104019-...ith-dropdwon-or-mask
It work on a 2.50 last time i tested.
DenisChenu I had already seen that plugin but unfortunately I get a 500 error on my server when I install it and try to acces survey settings / Plugins
I can not reproduce the issue : then need tester.
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 topic has been locked.
- ramzus
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 4 months ago #143401
by ramzus
Replied by ramzus on topic Array question with answers in dropdown boxes
Hi tpartner,
I used this solution and it was very helpful, but now i want to show the selected dropdown text in the next question but the Limesurvey replacement field properties shown only the code selected.
Thanks
I used this solution and it was very helpful, but now i want to show the selected dropdown text in the next question but the Limesurvey replacement field properties shown only the code selected.
Thanks
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
7 years 4 months ago #143406
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 question with answers in dropdown boxes
Err...which solution. There are many in this thread, some of which are years old. It may be better to start a new thread describing exactly what you did and the details of your LimeSurvey environment.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- ramzus
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 4 months ago #143413
by ramzus
Replied by ramzus on topic Array question with answers in dropdown boxes
The solution for the array question with text answers in a dropdown box i want to show the selected dropdown text in the next question but the Limesurvey replacement field properties shown only the code selected.
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $('#questionQQ .answer_cell_001 option[value=1]').text('No recurro'); $('#questionQQ .answer_cell_001 option[value=2]').text('Arocena Gustavo'); $('#questionQQ .answer_cell_001 option[value=3]').text('Aspra Manuel'); $('#questionQQ .answer_cell_001 option[value=4]').text('Bravo Ricardo'); $('#questionQQ .answer_cell_001 option[value=5]').text('Zalazar Martin'); $('#questionQQ .answer_cell_002 option[value=1]').text('No recurro'); $('#questionQQ .answer_cell_002 option[value=2]').text('Bravo Ricardo'); $('#questionQQ .answer_cell_002 option[value=3]').text('Fernandez Flavio'); $('#questionQQ .answer_cell_002 option[value=4]').text('Zalazar Martin'); $('#questionQQ .answer_cell_002 option[value=5]').text('').hide(); });
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
7 years 4 months ago #143424
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 question with answers in dropdown boxes
In that case, you would either need to use Expression Manager to pipe in the text depending on the code or use
Denis' arrayTextAdapt plugin
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- ramzus
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
7 years 4 months ago #143436
by ramzus
Replied by ramzus on topic Array question with answers in dropdown boxes
Thank you very much, i will try this
The topic has been locked.
- b1994mi
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 4
5 years 8 months ago #170145
by b1994mi
Replied by b1994mi on topic Array question with answers in dropdown boxes
Hi,
I have been using tpartner's javascript for providing dropdown options on array (texts). But, now I need something a bit specific. I need to make certain row readonly and force an answer that is different from the options provided by the dropdown.
What the respondents will think is that this readonly inputs are fixed because they need to use MRT for that journey.
Here is the mockup of what I need:
I have attached my survey file with only the corresponding question group.
I have been using tpartner's javascript for providing dropdown options on array (texts). But, now I need something a bit specific. I need to make certain row readonly and force an answer that is different from the options provided by the dropdown.
What the respondents will think is that this readonly inputs are fixed because they need to use MRT for that journey.
Here is the mockup of what I need:
I have attached my survey file with only the corresponding question group.
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
5 years 8 months ago #170227
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 question with answers in dropdown boxes
I don't think it's possible with a single array question as your "MRT" row is a moving target depending on the answers to the first two questions. I would do it with three array questions, styled with CSS to appear as one.
- One array for modes getting to MRT
- One (readonly) array for MRT
- One array for modes getting from MRT
- One array for modes getting to MRT
- One (readonly) array for MRT
- One array for modes getting from MRT
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- b1994mi
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 4
5 years 8 months ago #170232
by b1994mi
Replied by b1994mi on topic Array question with answers in dropdown boxes
Hi,
I have found this thread and it is about two radio button question merged into one.
How to call the previous question? (assuming that I place the MRT in the middle)
Or is there any exact thread you can refer? It is a bit too complicated for me to implement the CSS
Thank you in advance.
I have found this thread and it is about two radio button question merged into one.
How to call the previous question? (assuming that I place the MRT in the middle)
Or is there any exact thread you can refer? It is a bit too complicated for me to implement the CSS
Thank you in advance.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
5 years 8 months ago #170236
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 question with answers in dropdown boxes
It would be far easier to do it with CSS but the details would depend on your LimeSurvey version and theme.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- b1994mi
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 4
5 years 8 months ago #170276
by b1994mi
Replied by b1994mi on topic Array question with answers in dropdown boxes
Hi,
My Limesurvey version is Version 3.6.2+180406 and the theme is fruity. Is there any thing that I should notice if I ever needed the workaround to be done on another version and theme?
Thank you in advance.
My Limesurvey version is Version 3.6.2+180406 and the theme is fruity. Is there any thing that I should notice if I ever needed the workaround to be done on another version and theme?
Thank you in advance.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
5 years 8 months ago #170278
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 question with answers in dropdown boxes
- Assign Q1 a CSS class "merge-bottom".
- Assign Q2 CSS classes "merge-top merge-bottom".
- Assign Q3 a CSS class "merge-top".
Add something like this to custom.css in your extended theme:
Regarding other themes - you would need to explore the HTML and CSS affecting the layout to determine what is required.
- Assign Q2 CSS classes "merge-top merge-bottom".
- Assign Q3 a CSS class "merge-top".
Add something like this to custom.css in your extended theme:
Code:
.question-container.merge-bottom { margin-bottom: 0; border-bottom: 0 none; } .question-container.merge-bottom .answer-container { padding-bottom: 0; } .question-container.merge-top, .question-container.merge-top .subquestion-list, .question-container.merge-top .subquestion-list tbody tr:first-child > * { border-top: 0 none; } .question-container.merge-top .answer-container { padding-top: 0; } .question-container.merge-top .question-title-container, .question-container.merge-top .question-valid-container, .question-container.merge-top .subquestion-list thead { display: none; }
Regarding other themes - you would need to explore the HTML and CSS affecting the layout to determine what is required.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.