Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Deleted answers when update survey with conditional hidden Questions/Groups.

  • adminpickering
  • adminpickering's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 10 months ago #228868 by adminpickering
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.3.16
Own server or LimeSurvey hosting:limesurvey.net
Survey theme/template:Default
==================
Hello, not sure if it's issue or default behavior.
When reopen link with a survey ("Allow multiple responses or update responses with one access code: " is enabled. ),
then the previous answers from currently hidden parts (conditionally hidden G01Q022 ) are deleted.
Don't need to send/confirm anything.

Maybe I'm hiding Questions/Groups in wrong way.

Question summary  G01Q022  (ID: 231) Question group:   (ID:1)Code: G01Q022 : (Optional question)Question:  Help:  Type: Long free text (Type: T)Mandatory: NoEncrypted: NoCondition: (( G01Q02.NAOK == "AO01"))Group relevance:1
 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 10 months ago #228911 by tpartner
It seems normal to me. If a question is hidden via relevance/conditions, no answer is recorded when the form is submitted.

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.

  • adminpickering
  • adminpickering's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago #228962 by adminpickering
Thanks for reply,
i meant it wipe previously (hidden) recorded data.

The idea was to share the same survey with multiple users(for any reason) and show them content based on conditions.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago #228970 by tpartner
Yes, that's why I said "when the form is submitted". The previously recorded data will be removed if someone revisits the survey and submits a page with a question now hidden via relevance.

A workaround (involving more development) may be to add an attribute to the <body> element to control the visibility of questions via CSS. I suspect you are using a question for the hide/show conditions so that could be accessed in the survey theme TWIG files with the processString() function.

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.

  • adminpickering
  • adminpickering's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago - 1 year 9 months ago #229001 by adminpickering
Got ansver from survey-consulting.com.

in config-defaults.php change 'deletenonvalues' value from 1 to 0.
 
Last edit: 1 year 9 months ago by adminpickering.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago - 1 year 9 months ago #229004 by tpartner
Or that. :)

But note that it will affect all surveys. My solution is for specific surveys.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 1 year 9 months ago by tpartner.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose