Star Ratings Workaround not working in question groups

More
5 years 2 weeks ago #81802 by IMPACTprogram
IMPACTprogram created the topic: Star Ratings Workaround not working in question groups
Hi all! I'm very new to LimeSurvey and I'm trying to workout the star rating workaround using the codes found here: docs.limesurvey.org/Workarounds%3A+Quest...meric_Input_Question
(Numeric Input Question)

It works when I preview each question individually by entering the star rating code and the javascript onload function within the source code of each question. However, when I preview or test the question group, it changes the first question somehow to a 10 point star (instead of the 5 I've entered) and removed the star ratings for each following question in the group?? Please help. I would like to group questions.

I've tried to enter the <script> onload with each question referenced:
// Call the function for the numeric question
handleRatingNumeric (SSSSS, GG, 1); handleRatingNumeric (SSSSS, GG, 2); handleRatingNumeric (SSSSS, GG, 3);

Still, I get the same thing. I really appreciate if someone could direct me where to specifically add the script onload to get around the grouping error.

Many thanks,
Farrin

Please Log in to join the conversation.

More
5 years 2 weeks ago #81821 by Mazi
Mazi replied the topic: Star Ratings Workaround not working in question groups
1. Which Limesurvey version do you use?

2. What happens if you start the survey in group by group mode, does that match the group preview and does it show the same problems?

3. Please attach a link to an activated test survey.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 2 weeks ago #81886 by IMPACTprogram
IMPACTprogram replied the topic: Star Ratings Workaround not working in question groups
Hi Mazi, Thanks.

1. Using: Version 1.92+ Build 120608

2. I started the survey in Group by Group mode, the preview still has the funky star rating, as does the active survey.

3. Here's a link to the activated survey test:
www.lgbtstudy.org/limesurvey/index.php?sid=88863&lang=en

Please Log in to join the conversation.

More
5 years 2 weeks ago #81887 by Mazi
Mazi replied the topic: Star Ratings Workaround not working in question groups
There seems to be something wrong with the way you add the JavaScript. It seems that JS code is added at group level for three questions:
// Call the function for the numeric question
handleRatingNumeric (47926, 1, 1); handleRatingNumeric (47926, 1, 2); handleRatingNumeric (47926, 1, 3);

...and there seems to be JS code added at every question as well.

Also check if the IDs are correct.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 2 weeks ago #81893 by IMPACTprogram
IMPACTprogram replied the topic: Star Ratings Workaround not working in question groups
Sorry, I had tried adding the JS at Group level too, but it doesn't change the outcome, even when I remove. Is it correct to have the <div> call for the star ratings in each question as well as the JS code in each question with the specific IDs for each question or should the JS code only be in the first question with the multiple handleRatingNumeric call (including IDs for each question within that group)?

Please Log in to join the conversation.

More
5 years 2 weeks ago #81908 by tpartner
tpartner replied the topic: Star Ratings Workaround not working in question groups
You only need to put in the code once for each page - you can call all questions on a page in the same piece of code.

Did you give unique names for the radio inputs for each question? In other words, all radios in Q1 should be named something like "q1Rate" and all in Q2 should be "q2Rate"...

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 2 weeks ago #81926 by tpartner
tpartner replied the topic: Star Ratings Workaround not working in question groups
Oh, and Expression Manager is screwing up your code. You now need a space after all opening curly braces and before all closing curly braces.

So this:
<input type="radio" class="star {split:2}" title="1" value="1" name="q1Rate" />

needs to be this:
<input type="radio" class="star { split:2 }" title="1" value="1" name="q1Rate" />

I've updated the workaround - docs.limesurvey.org/Workarounds%3A+Quest...meric_Input_Question

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 2 weeks ago #81983 by IMPACTprogram
IMPACTprogram replied the topic: Star Ratings Workaround not working in question groups
Perfect! It worked! Thanks so much for your consistent help! I think adding a note on the workaround about adding the JS call function only on the first question within a group might be helpful for other newbs like me. And a note about changing the rate name with each question (seems obvious...now). Thanks again!! :cheer:

Please Log in to join the conversation.

More
5 years 2 weeks ago #81985 by tpartner
tpartner replied the topic: Star Ratings Workaround not working in question groups
You're welcome. The workarounds are a wiki, you can add anything you feel appropriate.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 2 weeks ago #82016 by DenisChenu
DenisChenu replied the topic: Star Ratings Workaround not working in question groups
Hello,

Too late, but there are already an advanced setting for Star rating system in LS.

See the 5 point choice advanced settings.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: IMPACTprogram

Please Log in to join the conversation.

More
5 years 2 weeks ago #82017 by tpartner
tpartner replied the topic: Star Ratings Workaround not working in question groups
In 1.92?


Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:

Please Log in to join the conversation.

More
5 years 2 weeks ago - 5 years 2 weeks ago #82019 by DenisChenu
DenisChenu replied the topic: Star Ratings Workaround not working in question groups
Look at use slider layout.

Think it's best to rework on this (and on another system) nut existing.

:)

PS: master : limesurvey.sondages.pro/index.php?sid=46854&newtest=Y&lang=en

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 5 years 2 weeks ago by DenisChenu.

Please Log in to join the conversation.

More
5 years 1 week ago #82041 by tpartner
tpartner replied the topic: Star Ratings Workaround not working in question groups
Okay, now I see it but why would it be called "Use slider layout" when it has nothing to do with sliders but refers to stars?

And, of course, it doesn't help if you want 1/2 stars or 10 stars...


Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:

Please Log in to join the conversation.

More
5 years 1 week ago #82074 by Mazi
Mazi replied the topic: Star Ratings Workaround not working in question groups
I think we should rename that, maybe to "Use different layout".

What do you think?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 1 week ago #82082 by tpartner
tpartner replied the topic: Star Ratings Workaround not working in question groups
"Alternate layouts"

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now