I was referring to improving his/her code to get a better performance. As Expression Manager/Script was untouched I did not expect any improvement.
However, I am not sure if on this level, other tools wouldn't have performance issues either. I don't know. But the equations and checks and filters WMPsurvey is using are quite extensive...
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
(in response to my calculation of =100%) How do I fix this? I am not a super technical person, this survey took me 2 months to make. Not super Lime savvy, I spent a lot of time on this forum to setup this survey configuration. Any advice on how to fix this part is helpful, thank you!!
As I wrote before you shouldn't do the calculation of the sum 4 times at each change of a dropdown.
Do it once in the question validation.
Leave the validation tip to "The sum of percentages has to be 100%". Nothing else.
So this tip will be displayed in red if the sum is not equal 100, otherwise in default color.
And of course you cannot proceed.
Remove the array filter and remove the calculation in the "max. input".
I tested this and it is much faster though the calculation (sum of about 150 elements) takes some time. But it is acceptable.
I do not talk about the layout of HR2. In my opinion it could be done better (e.g. with different headers to have a better structure and tooltips or popovers instead of the long explanations).
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Another option is:
Split the question.
Ask for the percentages in a question of type "multiple numerical input".
Here use the setting "sum=100".
That's all. You do not need a validation.
"Remaining" and "Total" are shown automatically.
The respondents enter the percentages manually, what in my opinion is faster than to click a dropdown and scroll to the desired value.
In the next question you ask the "Opportunities for Optimization" for items with a percentage>0.
This you may do now in a question of type "array". So the javascript is not needed.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless