Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Popup windows in array question

  • flo2442
  • flo2442's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 11 months ago #216515 by flo2442
Replied by flo2442 on topic Popup windows in array question
That's exactly what I was loooking for! thank you so much for the patience and comprehension.

I appreciated all your suggestions, and I'll consider to change structure of the question to make it more clear. now, with all the examples, I have all the options and I can chose.
Thank you very much!
The topic has been locked.
  • flo2442
  • flo2442's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 11 months ago #216545 by flo2442
Replied by flo2442 on topic Popup windows in array question
I tried to add this code to question editor:

<script type="text/javascript" charset="utf-8">
$(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,1');
$('#question{QID} tr.answers-list:eq(0) .answer_cell_2 *').attr('title','This is cell 1,2');
$('#question{QID} tr.answers-list:eq(0) .answer_cell_3 *').attr('title','This is cell 1,3');
$('#question{QID} tr.answers-list:eq(0) .answer_cell_4 *').attr('title','This is cell 1,4');
$('#question{QID} tr.answers-list:eq(1) .answer_cell_1 *').attr('title','This is cell 2,1');
$('#question{QID} tr.answers-list:eq(1) .answer_cell_2 *').attr('title','This is cell 2,2');
$('#question{QID} tr.answers-list:eq(1) .answer_cell_3 *').attr('title','This is cell 2,3');
$('#question{QID} tr.answers-list:eq(1) .answer_cell_4 *').attr('title','This is cell 2,4');
$('#question{QID} tr.answers-list:eq(2) .answer_cell_1 *').attr('title','This is cell 3,1');
$('#question{QID} tr.answers-list:eq(2) .answer_cell_2 *').attr('title','This is cell 3,2');
$('#question{QID} tr.answers-list:eq(2) .answer_cell_3 *').attr('title','This is cell 3,3');
$('#question{QID} tr.answers-list:eq(2) .answer_cell_4 *').attr('title','This is cell 3,4');
});
</script>

it doesn't work.. i feel i'm doing something wrong. Where do I have to insert this code? I'm sorr but i don't know javascript..
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago - 2 years 11 months ago #216561 by Joffm
Replied by Joffm on topic Popup windows in array question

I tried to add this code to question editor:


You tried, or you did it? 

And you added it in source code mode?

By the way: The first function
$(function () {
$('[data-bs-toggle="tooltip"]').tooltip()
})

is not necessary.  You can rmove it.
This one you need if you add bootstrap tooltips. I tried that but without success.
Therefore in this example only the standard tooltips.

So the only chance is, you show us your tries.
Send a lss export of the survey (the relevant question).

Joffm


 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 11 months ago by Joffm. Reason: typo
The following user(s) said Thank You: flo2442
The topic has been locked.
  • flo2442
  • flo2442's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 11 months ago #216564 by flo2442
Replied by flo2442 on topic Popup windows in array question
Ah ah, I wanted to say "I tried without success"   (not english speaker, pardon)

Here my test question.
Again thank you a lot
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #216566 by Joffm
Replied by Joffm on topic Popup windows in array question
Hi,
again with a smiley.
Why don't people do what they are told? 

I wrote

(where "cell_1" means, the cell with answer code "1")

But your cells do not have a code "1", nor "2", but "A1", "A5", "A4"...
(Is there a reason for this strange order?)

And why don't you use numerical codes?
Usually an array represents a scale. So later you want to calculate some statistical measures, like mean, Std.deviation, maybe t-Tests, correlations or so.
Then you need numerical codes, not texts like "A1".

So you have to use:
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
        $('#question{QID} tr.answers-list:eq(0) .answer_cell_A1 *').attr('title','This is cell 1,1');
        $('#question{QID} tr.answers-list:eq(0) .answer_cell_A5 *').attr('title','This is cell 1,2');
        $('#question{QID} tr.answers-list:eq(0) .answer_cell_A4 *').attr('title','This is cell 1,3');
        $('#question{QID} tr.answers-list:eq(0) .answer_cell_A3 *').attr('title','This is cell 1,4');
...


Joffm

And there is a reason that we ask for lss exports only, not lsq nor lsg
lsq and lsg exports are language sensitive.
You can't import such a question or group into a survey with different base language.
So we volunteers have to create a survey hopefully with the correct base language to import your export.
And these exports don't contain the surveywide settings, which are very important sometimes.




 

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.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
2 years 11 months ago #216591 by tammo
Replied by tammo on topic Popup windows in array question
Do not forget to test this on a mobile phone when you expect people to use one...

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The following user(s) said Thank You: flo2442
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose