Save data from hidden question

Mehr
3 Jahre 3 Monate her #107243 von LimeLight
LimeLight erstellte das Thema Save data from hidden question
Hi,

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?

// TIA

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #107248 von holch
holch antwortete auf das Thema: Save data from hidden question
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.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #107266 von byan
byan antwortete auf das Thema: Save data from hidden question
Alternatively, you can write $("#questionID").hide(); in the question box or help box if you don't want to mess with CSS.
Folgende Benutzer bedankten sich: holch

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #107268 von holch
holch antwortete auf das Thema: Save data from hidden question
I didn't know this one. That is an interesting alternative, because you don't need to make chances to the template css.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #107269 von TMSWhite
TMSWhite antwortete auf das Thema: Save data from hidden question
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.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 3 Monate her #107278 von DenisChenu
DenisChenu antwortete auf das Thema: Save data from hidden question
Hi,

@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 service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden um der Konversation beizutretten.

Haben Sie schon bei unserer Kundenumfrage mitgemacht?

Verpassen Sie nicht Ihre Chance auf tolle Preise.

Klicken sie hier um teilzunehmen:

Jetzt starten

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten