- Posts: 38
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
What code saves the survey data to the results table?
- LarryMartell
- Topic Author
- Offline
- Junior Member
Less
More
4 years 7 months ago #188162
by LarryMartell
What code saves the survey data to the results table? was created by LarryMartell
We have a survey that has some custom table or array questions. That is managed by our custom JS code. That code creates them but I do not think it has anything to do with saving the data to the results table. We changed one field in this from a selectbox to a text box, and now that field is not getting saved to the results. Is there something somewhere that needs to be changed at the lime level to tell it that it's a text field and not a select box?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 7 months ago #188170
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic What code saves the survey data to the results table?
You show a dropdown as a textbox ?
A dropdown is a single choice with a code, if this code didn't exist in the current answer list : it's not accepted .
You must use short text for text question
A dropdown is a single choice with a code, if this code didn't exist in the current answer list : it's not accepted .
You must use short text for text question
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- LarryMartell
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 38
- Thank you received: 0
4 years 6 months ago #188175
by LarryMartell
Replied by LarryMartell on topic What code saves the survey data to the results table?
That is not what I said. I said I had field that was a dropdown and it was working. I changed it to a text box and now it's not getting saved.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12779
- Thank you received: 3940
4 years 6 months ago #188183
by Joffm
Without showing how you changed, it's a bit like "The car doesn't start. Why?"
So, please provide the survey (the relevant questions) as *.lss export.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic What code saves the survey data to the results table?
And? What do you expect us to say?I had field that was a dropdown and it was working. I changed it to a text box and now it's not getting saved.
That is managed by our custom JS code. ....
We changed one field in this from a selectbox to a text box, and now that field is not getting saved to the results.
Without showing how you changed, it's a bit like "The car doesn't start. Why?"
So, please provide the survey (the relevant questions) as *.lss export.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 6 months ago #188191
by DenisChenu
When you disable js : it's a dropdown ?
If yes : «if this code didn't exist in the current answer list : it's not accepted .»
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic What code saves the survey data to the results table?
Yes exactly what i say : «You show a dropdown as a textbox ?» in javascript.LarryMartell wrote: That is not what I said. I said I had field that was a dropdown and it was working. I changed it to a text box and now it's not getting saved.
When you disable js : it's a dropdown ?
If yes : «if this code didn't exist in the current answer list : it's not accepted .»
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- LarryMartell
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 38
- Thank you received: 0
4 years 6 months ago #188193
by LarryMartell
Replied by LarryMartell on topic What code saves the survey data to the results table?
No it is a text field. I have another data point on this - some fields are set by my JS code - they all appear on the survey page. But when the survey is saved only the fields that are set by the JS code that are dropdowns are saved in the results table. The text fields that are set by the JS code do not make it into the results table. But if the text fields are set by the user then they do make it into the results table. That is why I was interested it looking at the code that actually populates the results table.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10629
- Thank you received: 3696
4 years 6 months ago #188196
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 What code saves the survey data to the results table?
As Joffm says - how can we possibly debug that without knowing what you did with JavaScript?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- LarryMartell
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 38
- Thank you received: 0
4 years 6 months ago #188200
by LarryMartell
Replied by LarryMartell on topic What code saves the survey data to the results table?
The fields I fill in from my JS code I make disabled so the user cannot change them. That seems to be the issue. If I do not make them disabled they do get saved.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 6 months ago - 4 years 6 months ago #188201
by DenisChenu
Please : review the base : www.w3.org/TR/html401/interact/forms.html#disabled
And www.w3.org/TR/html401/interact/forms.html#successful-controls
It's not a "HTML learning" forum.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic What code saves the survey data to the results table?
disable input are not send on server …LarryMartell wrote: The fields I fill in from my JS code I make disabled
Please : review the base : www.w3.org/TR/html401/interact/forms.html#disabled
And www.w3.org/TR/html401/interact/forms.html#successful-controls
It's not a "HTML learning" forum.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 4 years 6 months ago by DenisChenu. Reason: We are not a "HTML learning" forum.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10629
- Thank you received: 3696
4 years 6 months ago #188208
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 What code saves the survey data to the results table?
Set a readonly attribute instead.The fields I fill in from my JS code I make disabled so the user cannot change them. That seems to be the issue. If I do not make them disabled they do get saved.
Code:
$('input.myClass').prop('readonly', true);
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: LarryMartell
The topic has been locked.
- LarryMartell
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 38
- Thank you received: 0
4 years 6 months ago #188211
by LarryMartell
Replied by LarryMartell on topic What code saves the survey data to the results table?
Thanks - that works perfectly!
The topic has been locked.