I'm generating a GUID via a javascript. I'm printing it to a long textfield. However, when i set the question to "always hide this question" the GUID is not stored among the answers. How can I make the GUID stick to the answer table while still being hidden?
You can't write to a question which is hidden via "always hide this question" because it does no show up in the HTML code and you can only write with Javascript to a question that is in the HTML code.
What you need to do is hide the question via CSS, thus it is just not shown in the browser, but it is still in the html code and thus read and writable via JS.
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.
If the goal is to have the GUID stored in the database, then you can use an Equation question to do this. Equations are unique among questions types in that their value is always saved to the database even if the always_hidden attribute is set. For all other question types, if the question is hidden by always_hidden, or relevance (e.g. the question is not applicable), then the database stores NULL for that question.
@Thomas : hidden => save in DB : default value OR value set by Equation ( Q1="Answer ).
No ability to use javascript
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.