- Posts: 9
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Popup windows in array question
- flo2442
- Topic Author
- Offline
- New Member
Less
More
2 years 10 months ago #216375
by flo2442
Popup windows in array question was created by flo2442
Hi everyone,
I'd like to insert a popup in an array question / dual array question, that explains the meaning of the scale 1-5.
I'd like to insert a different popup fo each cell. I attach a mockup image.
How can I do it?
Thank you in advance
I'd like to insert a popup in an array question / dual array question, that explains the meaning of the scale 1-5.
I'd like to insert a different popup fo each cell. I attach a mockup image.
How can I do it?
Thank you in advance
Attachments:
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
2 years 10 months ago #216386
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Popup windows in array question
You're looking for "tooltips". You can search the forum for different implementations.
It sometimes depends on your LimeSurvey version.
For LS3 and LS4 take a look at
survey-consulting.com/how-to-use-bootstr...a-limesurvey-survey/
It sometimes depends on your LimeSurvey version.
For LS3 and LS4 take a look at
survey-consulting.com/how-to-use-bootstr...a-limesurvey-survey/
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: flo2442
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
2 years 10 months ago #216393
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Popup windows in array question
You seem to use a 5-point array.
This is not the best question type.
Use a "normal" array and you are free to define the scale
This is not the best question type.
Use a "normal" array and you are free to define the scale
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- flo2442
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
2 years 10 months ago #216416
by flo2442
Replied by flo2442 on topic Popup windows in array question
Thank you for your response!
The array works great.. but in my example I have 3 rows that require a different meaning of the 1-5 scale. I would like to have the possibility to specify the significate of the scale differently for each question through a tooltip
Thanks for your response
The array works great.. but in my example I have 3 rows that require a different meaning of the 1-5 scale. I would like to have the possibility to specify the significate of the scale differently for each question through a tooltip
Thanks for your response
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
2 years 10 months ago #216418
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Popup windows in array question
Though it is a misuse of an array question, there is a solution.
Later I will send an example.
And you can consider to use three questions and use the css classes "no-question" and "no-bottom" to combine them.
As said: later
Joffm
Later I will send an example.
And you can consider to use three questions and use the css classes "no-question" and "no-bottom" to combine them.
As said: later
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: flo2442
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
2 years 10 months ago #216429
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Popup windows in array question
Well, here the example with 4 combined array questions.
There are two css classes involved
"no-question", which is added to the second, third and fourth question
"no-bottom", which is added to the first, second and third question
This is the css which you add to your "custom.css".
Unfortunately I did not find the other solution yet. (I hope I remembered well that there was one.)
Joffm
Attachment not found
There are two css classes involved
"no-question", which is added to the second, third and fourth question
"no-bottom", which is added to the first, second and third question
This is the css which you add to your "custom.css".
Code:
.no-question{border-top:0;} .no-question .question-title-container{display:none;} .no-question .question-valid-container{display:none;} .no-question .answer-container { padding-top: 0em; padding-bottom: 0.5em; } .no-bottom{border-bottom:0;margin-bottom:0;} .no-bottom .answer-container { padding-bottom: 0em; }
Unfortunately I did not find the other solution yet. (I hope I remembered well that there was one.)
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
2 years 10 months ago #216431
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Popup windows in array question
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
2 years 10 months ago #216445
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Popup windows in array question
And here the other solution, with javascript and only one question
You see the lines with "eq(x)". Here you define where the new header is inserted.
Joffm
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify this question var thisQuestion = $('#question{QID}'); // Insert the new header rows $('tr.answers-list:eq(0)', thisQuestion).before('<tr>\ <td></td>\ <th style="text-align:center;">very long</th>\ <th style="text-align:center;">long</th>\ <th style="text-align:center;">neither/nor</th>\ <th style="text-align:center;">short</th>\ <th style="text-align:center;">very short</th>\ </tr>'); $('tr.answers-list:eq(2)', thisQuestion).before('<tr>\ <td></td>\ <th style="text-align:center;">very good</th>\ <th style="text-align:center;">good</th>\ <th style="text-align:center;">neither/nor</th>\ <th style="text-align:center;">poor</th>\ <th style="text-align:center;">very poor</th>\ </tr>'); $('tr.answers-list:eq(4)', thisQuestion).before('<tr>\ <td></td>\ <th style="text-align:center;">very high</th>\ <th style="text-align:center;">high</th>\ <th style="text-align:center;">neither/nor</th>\ <th style="text-align:center;">low</th>\ <th style="text-align:center;">very low</th>\ </tr>'); }); </script>
You see the lines with "eq(x)". Here you define where the new header is inserted.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- flo2442
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
2 years 10 months ago #216492
by flo2442
Replied by flo2442 on topic Popup windows in array question
Thank you so so much for your 2 useful examples!
Expecially the example with javascript and only one question fits my necessity!
Regarding that last example.. is there a way to avoid to insert new headers, and simply put the information that in the example are in the new headers into tooltips? A different tooltip that appears when the cursor is on the specific answer cell.
Thanks in advance, I appreciated a lot your responses!
Expecially the example with javascript and only one question fits my necessity!
Regarding that last example.. is there a way to avoid to insert new headers, and simply put the information that in the example are in the new headers into tooltips? A different tooltip that appears when the cursor is on the specific answer cell.
Thanks in advance, I appreciated a lot your responses!
The topic has been locked.
- flo2442
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
2 years 10 months ago #216493
by flo2442
Replied by flo2442 on topic Popup windows in array question
Thank you for the useful links!
In the link it's well explained how to add tooltips for answer options.
I would like to personalize the tooltips.
In picture 1: the standard Limesurvey array. in the column with answer option = 1 the tooltip that appears autoatically passing the cursor on the cell is exactly showing 1.
in picture 2: i would linke to personalize the tooltip, to have a different text from the answer option above (ex. not replicating the 1, but adding some text more). I would like to be able to define a different tooltip for each cell (different in the same column)
Do you maybe know how can i obtain the result in picture 2?
In the link it's well explained how to add tooltips for answer options.
I would like to personalize the tooltips.
In picture 1: the standard Limesurvey array. in the column with answer option = 1 the tooltip that appears autoatically passing the cursor on the cell is exactly showing 1.
in picture 2: i would linke to personalize the tooltip, to have a different text from the answer option above (ex. not replicating the 1, but adding some text more). I would like to be able to define a different tooltip for each cell (different in the same column)
Do you maybe know how can i obtain the result in picture 2?
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11637
- Thank you received: 2737
2 years 10 months ago #216497
by holch
Well then you don't need Joffm's example. He is providing those, because he probably thinks (like I do), that it is better to have different scales and not using tooltips (I don't think that they are a good idea).
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 Popup windows in array question
Regarding that last example.. is there a way to avoid to insert new headers, and simply put the information that in the example are in the new headers into tooltips?
Well then you don't need Joffm's example. He is providing those, because he probably thinks (like I do), that it is better to have different scales and not using tooltips (I don't think that they are a good idea).
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: flo2442
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
2 years 10 months ago #216502
by Joffm
But anyway:
You may use this: (where "cell_1" means, the cell with answer code "1")
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Popup windows in array question
Yes, because he thinks, this is the best way to confuse people.He is providing those, because he probably thinks ...
But anyway:
You may use this: (where "cell_1" means, the cell with answer code "1")
Code:
$(function () { $('[data-bs-toggle="tooltip"]').tooltip() }) $(document).ready(function() { $('#question{QID} tr.answers-list:eq(0) .answer_cell_1 *').attr('title','This is cell 1 in the first row'); $('#question{QID} tr.answers-list:eq(0) .answer_cell_2 *').attr('title','This is cell 2 in the first row'); ... $('#question{QID} tr.answers-list:eq(4) .answer_cell_4 *').attr('title','This is cell 4 in the fifth row'); ... }); </script>
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: flo2442
The topic has been locked.