Welcome, Guest
Username: Password: Remember me

TOPIC: Ranking question prefilled: how to hide unselected values ?

Ranking question prefilled: how to hide unselected values ? 10 months 3 weeks ago #102996

  • karld
  • karld's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 15
  • Karma: 0
Hello,

I have a multiple choice question 1 (checkboxes) that I use to prefill a ranking question 2 (same functionality as www.partnersinc.biz/surveys//index.php?s...14&newtest=Y&lang=en but so far I have not needed to use javascript). Version 2.00+ Build 130802.

Here is the code for an item in question 2:
{if(is_empty(INSERTANS:962814X3X20SQ007),'','aan behandelingen voor besmettelijke ziekten')}

Unchecked items in question 1 are shown as empty items in question 2, which means they can be ordered in question 2 while not having been selected in question 1 (see attachment), which is unwanted.

Is there a way to hide the items in question 2 that they are not checked in question 1?

Thanks in advance.
Attachments:
The administrator has disabled public write access.

Ranking question prefilled: how to hide unselected values ? 10 months 3 weeks ago #103009

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4371
  • Thank you received: 829
  • Karma: 381
You should be able to hide those empty elements with JavaScript.

Can you attach a sample survey?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Ranking question prefilled: how to hide unselected values ? 10 months 3 weeks ago #103012

  • karld
  • karld's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 15
  • Karma: 0
Thank you.

Here it is.
Attachments:
The administrator has disabled public write access.

Ranking question prefilled: how to hide unselected values ? 10 months 3 weeks ago #103014

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4371
  • Thank you received: 829
  • Karma: 381
In version 2.00+ you can use array filtering on ranking questions - manual.limesurvey.org/Question_type_-_Ra...r_.28array_filter.29.

Here is your survey back with the array filter applied and relevance applied so the ranking question only appears if more than one item in the check-box question is selected.

File Attachment:

File Name: limesurvey_survey_2671741.lss
File Size: 22 KB


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: karld

Ranking question prefilled: how to hide unselected values ? 10 months 3 weeks ago #103017

  • karld
  • karld's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 15
  • Karma: 0
Thank you very much.

I managed to change my (complete) survey by doing the following in the question 2 (m3):
  • in the advanced settings: Array filter = m1 (question 1) and Minimum answers = 0
  • in the subquestions of m3 (question 2): put the same codes as for the m1 (question 1) subquestions codes and for the subquestions in m3, don't use code, just type what should appear (corresponding to the code) in the item once it is selected in m1

It seems to work fine, I hope I didn't miss anything.

Thank you again for your help.
The administrator has disabled public write access.

Ranking question prefilled: how to hide unselected values ? 10 months 3 weeks ago #103019

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4371
  • Thank you received: 829
  • Karma: 381
Nope, you didn't miss anything.

You're welcome.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: DenisChenu
Moderators: ITEd
Time to create page: 0.159 seconds
Donation Image