Welcome to the LimeSurvey Community Forum

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

Array with different answer types

  • caitifty
  • caitifty's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 8 months ago #157591 by caitifty
Array with different answer types was created by caitifty
Is it possible to have different variable types in the same array? My use case is wanting to ask respondents to give either the year an event happened or their age at the time. I can create a text array but that loses the ability to validate. Any suggestions?

Example:

"When was the first time you had a surgery where you needed general anesthetic?

[ ] Year this happened
[ ] OR your age at the time"
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 8 months ago #157609 by LouisGac
Replied by LouisGac on topic Array with different answer types
You must use javascript to reformat the output.
Also, you should ask yourself if your participants will only use a big computer screen or if they will also use tiny smartphone screens.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #157610 by tpartner
Replied by tpartner on topic Array with different answer types
It sounds like you want two dropdowns within a single array cell. I suppose you could use JavaScript to insert the dropdowns but, given that there would only be one column in the data, I don't see how you could analyse the mixed data.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose