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
  • LarryMartell's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 7 months ago #188162 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
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #188170 by DenisChenu
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

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
  • LarryMartell's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 6 months ago #188175 by LarryMartell
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
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #188183 by Joffm

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.

And? What do you expect us to say?

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
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #188191 by DenisChenu

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.

Yes exactly what i say : «You show a dropdown as a textbox ?» in javascript.

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
  • LarryMartell's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 6 months ago #188193 by LarryMartell
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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #188196 by tpartner
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
  • LarryMartell's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 6 months ago #188200 by LarryMartell
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
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago - 4 years 6 months ago #188201 by DenisChenu

LarryMartell wrote: The fields I fill in from my JS code I make disabled

disable input are not send on server …

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
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #188208 by tpartner

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.

Set a readonly attribute instead.

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
  • LarryMartell's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 6 months ago #188211 by LarryMartell
Thanks - that works perfectly!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose