- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Save the data after processing
- nguyenthedat
- Topic Author
- Offline
- New Member
Less
More
1 year 4 months ago #239198
by nguyenthedat
Save the data after processing was created by nguyenthedat
I have a text display, a hidden "Multi short text" question in a group. After I have calculated somthing in the text display, I showed up the result in it but I want to save this result to the responses. I used this code to do this but look like it didn't work. What wrong with my code?
Code:
var a = 18; var b = 12; var c = 12; var d = 6; $(document).ready(function(){ $('#question{QID} textarea').val(a); $('#question{QID} textarea').val(b); $('#question{QID} textarea').val(c); $('#question{QID} textarea').val(d); });
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12996
- Thank you received: 3999
1 year 4 months ago #239203
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Save the data after processing
Hi,
you did not only ignore the initial questions, but also removed them.
Why?
And as answer:
Use a question of type "equation" to do calculations and store results.
Joffm
you did not only ignore the initial questions, but also removed them.
Why?
And as answer:
Use a question of type "equation" to do calculations and store results.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10115
- Thank you received: 3597
1 year 4 months ago - 1 year 4 months ago #239207
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 Save the data after processing
If you need to load the question via JavaScript, I see several problems...
As Joffm states, you did not give the LimeSurvey version, hosting, theme information.
You are targeting textarea elements where you probably have text input elements.
You are not targeting specific elements.
You are not firing a change event.
Attach a small sample survey (.lss file) containing only the relevant question.
As Joffm states, you did not give the LimeSurvey version, hosting, theme information.
You are targeting textarea elements where you probably have text input elements.
You are not targeting specific elements.
You are not firing a change event.
Attach a small sample survey (.lss file) containing only the relevant question.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 1 year 4 months ago by tpartner.
Please Log in to join the conversation.