Welcome to the LimeSurvey Community Forum

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

Prefill double array

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 3 months ago - 2 years 3 months ago #233178 by brais24
Prefill double array was created by brais24
lease help us help you and fill where relevant:
Your LimeSurvey version: 2.72
Own server or LimeSurvey hosting: Own
Survey theme/template: Default
==================
Hi there again people, on this time, I need to know if its possible to prefill a double array question  with "No" by default, i cant attach right now the question but is like this, I just want to put on each year No as default question.

Thanks for the help.

 
Last edit: 2 years 3 months ago by holch. Reason: Deleted copy/paste image from editor, to get rid of code salad.
The following user(s) said Thank You: Joffm

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #233187 by holch
Replied by holch on topic Prefill double array
You are long enough in this forum to know that you can copy and paste screenshots into the forum editor without creating "code salad" to the point to make the thread unreadable.

I will delete your screenshot. Please insert it the correct way (upload it and then insert it with the functions provided by the forum).

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.

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 3 months ago #233213 by brais24
Replied by brais24 on topic Prefill double array
 

There it is.

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 years 3 months ago #233214 by brais24
Replied by brais24 on topic Prefill double array
This is not necesary yet, i be able to do it with an ecuation question just before my question and putting this on the text of the question for each selection {E16_SQ001_1="A1"}{E16_SQ002_1="A1"}

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #233224 by tpartner
Replied by tpartner on topic Prefill double array
You should put an if statement in there so they don't get reset to No when the page is revisited.

Code:
{E16_SQ001_1 = if(is_empty(E16_SQ001_1), 'A1',  E16_SQ001_1)}

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.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose