Welcome to the LimeSurvey Community Forum

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

automatically add long text answer to the next ranking question

  • iuliana
  • iuliana's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 months ago #193868 by iuliana
Hello,


do you know if the answer to a long/short free text question type can automatically be added to the next question? Which would be the ranking type.


Thanks,
Iuli

Jul
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 months ago - 4 years 2 months ago #193918 by tpartner
Not directly as there is no answer relevance for ranking questions.

Assuming that the short-text is on a preceding page, you can apply this workaround which uses an array-filter in the ranking question.

1) Directly after the short-text, add a multiple-choice question (code filter1) with a single sub-question (code q1).

2) Assign a CSS class "hidden" to that question.

3) Directly after the multiple-choice, add an equation question with this expression. It will toggle the hidden check-box if there is a value in the short-text.
Code:
filter1_q1 = if(!is_empty(Q1), 'Y', '')

4) Assign a CSS class "hidden" to the equation question.

5) Add an answer option (code q1) to your ranking question with this as the label (assuming Q1 is the question code for the short-text).
Code:
{Q1}

6) Apply an array-filter to your ranking question based on the hidden check-box question (code filter1).


Sample survey attached:

File Attachment:

File Name: limesurvey...2-12.lss
File Size:32 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 2 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose