Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Hidden question not saved in database

Hidden question not saved in database 3 years 6 months ago #96443

  • Andrea01
  • Andrea01's Avatar
  • Offline
  • Senior Lime
  • Posts: 57
  • Karma: 0
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
The administrator has disabled public write access.

Hidden question not saved in database 3 years 6 months ago #96445

  • holch
  • holch's Avatar
  • Online
  • LimeSurvey Team
  • Posts: 5431
  • Thank you received: 809
  • Karma: 240
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.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | [url=https://manual.limesurvey.org/Workarounds[/url]

If you found this answer helpful and it saved you some time please consider a [url=https://donate.limesurvey.org[/url] to the...
The administrator has disabled public write access.

Hidden question not saved in database 3 years 6 months ago #96449

  • Andrea01
  • Andrea01's Avatar
  • Offline
  • Senior Lime
  • Posts: 57
  • Karma: 0
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
The administrator has disabled public write access.

Hidden question not saved in database 3 years 6 months ago #96456

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6571
  • Thank you received: 1477
  • Karma: 579
Try:
#question93 {display:none;}
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Hidden question not saved in database 3 years 6 months ago #96461

  • Andrea01
  • Andrea01's Avatar
  • Offline
  • Senior Lime
  • Posts: 57
  • Karma: 0
Hi tpartner,

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

Best regards,

Andrea
The administrator has disabled public write access.

Hidden question not saved in database 3 years 6 months ago #96491

  • Andrea01
  • Andrea01's Avatar
  • Offline
  • Senior Lime
  • Posts: 57
  • Karma: 0
Is there any solution to this problem?

Rgds,
Andrea
The administrator has disabled public write access.

Hidden question not saved in database 3 years 6 months ago #96496

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6571
  • Thank you received: 1477
  • Karma: 579
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.
The administrator has disabled public write access.

Hidden question not saved in database 3 years 6 months ago #96505

  • Andrea01
  • Andrea01's Avatar
  • Offline
  • Senior Lime
  • Posts: 57
  • Karma: 0
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
The administrator has disabled public write access.

Hidden question not saved in database 3 years 6 months ago #96523

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6571
  • Thank you received: 1477
  • Karma: 579
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.
The administrator has disabled public write access.
The following user(s) said Thank You: Andrea01

Hidden question not saved in database 3 years 6 months ago #96535

  • Andrea01
  • Andrea01's Avatar
  • Offline
  • Senior Lime
  • Posts: 57
  • Karma: 0
thank you, works fine.
The administrator has disabled public write access.
Time to create page: 1.428 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form