Welcome to the LimeSurvey Community Forum

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

Show row(s) of an array question based on answers of previous question

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 4 months ago - 3 years 4 months ago #225247 by LISHANGQI
lease help us help you and fill where relevant:
Your LimeSurvey version: [3.28]
Own server or LimeSurvey hosting: Own server 
Survey theme/template: fruity
==================
Dear all, 

I'm designing an SP experiment of travel mode choice. In my case, I'll let respondents report several stages of a journey, and ask them to choose the mode for certain stage(s) of that journey if they want. The stages of a journey are defined as subtrip before the main-trip, main trip, subtrip after the main trip. 

My question is: if respondents didn't report having the subtrip(s)  before and after the main trip, can I hide or exclude the row(s) of the "before" or "after"? I guess this should be a javascript issue? 

I've made a simple lss file and attached to this post, how this is clear for you. Thanks so much for your attention!



 
Last edit: 3 years 4 months ago by LISHANGQI.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago - 3 years 4 months ago #225248 by Joffm
Please, do not copy an image, but attach it
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 4 months ago by Joffm.

Please Log in to join the conversation.

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 4 months ago #225249 by LISHANGQI
Thanks, joffm, I just edit it.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #225250 by Joffm
And to answer your question:
You may use something like this

<tr style="{if(after=='A2','display:none;','')}">

And, please, structure your HTML code.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 4 months ago #225258 by LISHANGQI
Thank you Sir, it works! :)

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose