Welcome to the LimeSurvey Community Forum

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

Array number: set relevance equation in X-Scale

  • GiuliaDonati
  • GiuliaDonati's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 9 months ago #226391 by GiuliaDonati
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen] : Version 3.15.9+190214
Own server or LimeSurvey hosting: Limesurvey hosting (Eawag)
Survey theme/template: eawagls3
==================
Hello,

I would like to create an array numbers question (Q3) based on entries from two precedent questions (Q1 and Q2). Q1 and Q2 are multiple choice questions, where participants select only the answers that are relevant to them. Then Q3 is an array where participants provide details on the relationship between Q1 and Q2. I am able to modify the relevance equation in the Y-scale but it' is not possible to do so in the X-scale. Is there a way around this ?

I am attaching an example.

Thank you very much for any help/related topic provided,

Regards

Giulia

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #226397 by Joffm
Hi,
there is a plugin called "hideEmptyColumns".
So, the first thing you do is to create "empty columns"

If you code Q3 like this
 
the name of the actor is displayed (if he was selected) or nothing -> empty column.
Read about the properties like ".shown" here
[url] www.limesurvey.org/manual/ExpressionScri...#Access_to_variables [/url]

Now we get this.
 
what is not the desired result.

Now we have to use the plugin 
The plugin you get here
[url] gitlab.com/SondagesPro/QuestionSettingsType/hideEmptyColumn [/url]

I do not know what hosting at Eawag means; if you are allowed to install plugins or not.

Fortunately this plugin is very simple; so we can insert the javascript and the css directly into the source code of the question.

And the result is :
 

But it does not work on the same page; but in my opinion it is silly to display this dynamically growing array on the same page.
Here the sample survey
 

File Attachment:

File Name: limesurvey...3937.lss
File Size:33 KB


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: GiuliaDonati

Please Log in to join the conversation.

  • GiuliaDonati
  • GiuliaDonati's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 9 months ago #226422 by GiuliaDonati
Replied by GiuliaDonati on topic Array number: set relevance equation in X-Scale
Thank you very much Joffm !!! This worked perfectly, much appreciated !
Giulia

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose