Hidden question not saved in database

More
3 years 11 months ago #96443 by Andrea01
Andrea01 created the topic: Hidden question not saved in database
Hello,

my Problem is: I have a single choice question, which saves the answer of a previous question. This works fine, however, if I hide the question, the results are not saved in the database.

Can anyone be of help?

Version 2.00+ Build 130514

Thanks in advance and greetings from Austria
Andrea

Please Log in to join the conversation.

More
3 years 11 months ago #96445 by holch
holch replied the topic: Hidden question not saved in database
How do you hide the question and how do you pass the answer of the previous question to this question?

Because Javascript can't pass on information to questions that are hidden by the system. You need to hide the question via CSS, so that she is still there in the source code but just not shown to the respondents.

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

Please Log in to join the conversation.

More
3 years 11 months ago #96449 by Andrea01
Andrea01 replied the topic: Hidden question not saved in database
Dear Holch,

I pass the answer of the previous question in a short text question: Default value ->
{if(that.Q3,'{that.Q3.shown}', '{that.Q3a.shown}')}

and hide the short text question in advanced settings, but results are not saved in database.

I also tried to set "always hide this question" to no, and hide it via CSS ->
#question638444X3X93 {display:none;}

but in this case the question is not hidden.

Any idea?

Thanks a lot

Andrea

Please Log in to join the conversation.

More
3 years 11 months ago #96456 by tpartner
tpartner replied the topic: Hidden question not saved in database
Try:
#question93 {display:none;}

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 11 months ago #96461 by Andrea01
Andrea01 replied the topic: Hidden question not saved in database
Hi tpartner,

I also tried #question93 {display:none;}, did also not work.

Best regards,

Andrea

Please Log in to join the conversation.

More
3 years 11 months ago #96491 by Andrea01
Andrea01 replied the topic: Hidden question not saved in database
Is there any solution to this problem?

Rgds,
Andrea

Please Log in to join the conversation.

More
3 years 11 months ago #96496 by tpartner
tpartner replied the topic: Hidden question not saved in database
Can you attach the survey here (or a copy containing no sensitive content)?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
3 years 11 months ago #96505 by Andrea01
Andrea01 replied the topic: Hidden question not saved in database
here it is, I tried it with different templates. Answers of Q3a are saved, when I set "Always hide this question" to no.

As soon as I set it to yes it does not save the reuslts.

Regards
Andrea

File Attachment:

File Name: limesurvey...8444.lss
File Size:29 KB
Attachments:

Please Log in to join the conversation.

More
3 years 11 months ago #96523 by tpartner
tpartner replied the topic: Hidden question not saved in database
Why not use an Equation type question to store that value?

File Attachment:

File Name: limesurvey...8444.lss
File Size:29 KB

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: Andrea01

Please Log in to join the conversation.

More
3 years 11 months ago #96535 by Andrea01
Andrea01 replied the topic: Hidden question not saved in database
thank you, works fine.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now