Welcome to the LimeSurvey Community Forum

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

Can I delete or hide a row in an array question?

  • jma6610
  • jma6610's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 4 months ago #160352 by jma6610
I have an array question with 3 sub-questions in 3 rows and a few answer categories in columns.

I'm trying to delete or hide 1 or 2 of the rows depending upon the answers from a prior question.

I'm new with javascripts, but could get the script below to hide the entire question. ...but how can I modify to

delete/hide just (for example) row 2 if the answer to a prior question is 3 ?



<script type="text/javascript" charset="utf-8">

$(document).ready(function(){


var qHiddenID = {QID};
var hiddenQuestion = $('#question'+qHiddenID);


// Hide the hidden question
$(hiddenQuestion).hide();


});

</script>
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #160354 by Joffm
Hello,

Just use subquestion relevance.



Or depending on the type of previous question you could use array filter.

Please, read the manual, especially manual.limesurvey.org/Adding_answers_or_subquestions about

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • jma6610
  • jma6610's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 4 months ago #160355 by jma6610
Thanks Joffm,

but from the documentation I see that subquestion relevance is only available in version 2.06+ and the installation I have access to is 2.05. I'm trying to find the documentation on array filters. ...but if this can be done with script, it may be the easiest way for me.

Jeff
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #160479 by DenisChenu
Replied by DenisChenu on topic Can I delete or hide a row in an array question?
Hi, best is to update to last 2.6lts , because you have new options AND you have security issue in 2.05

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose