As it stands currently (using version 3.25.12) the relevance on subquestions in type H (Array by column) does not work.
This is an issue where work is needed, no planning available.
Denis, one of the power users designed a workaround which does almost everything I need, but not all.
My steps:
- install Denis'plugin from:
extensions.sondages.pro/questions-updati...column/download.html
and enable it in your LimeSurvey installation
- create a survey with two questions:
q1 is a Y/N questions with question codes also Y/N
q2 is a mandatory Array by column question with two sub-questions.
The text for subquestion 1 is "Subquestion 1" (arbitrary).
The text for subquestion 2 is
Code:
{is(q1.NAOK=="Y", "Subquestion 2", "")}
which should result in column 2 disappearing when q1 is answered with Y.
BUT: since q2 is mandatory, you cannot proceed, because column 2 never gets filled in, because it is not visible.
How to design this?
There is no way for default answers to be set in the user interface for this question. So this needs to be done in Javascript. Denis suggested:
- Leave mandatory, add a NA answer, hide (in js) the NA answer line.
- Remove mandatory and create an validation equation to replace it …
My conclusions on Denis' advise
- If I do this, I have to add an answer option that has as answer option code NA as well as the text for the answer option. I cannot use the setting (on survey level) of "Show no answer" since that only works for non-mandatory questions. But when I add this option as the first option, I do not see a way of prefilling it. Or I have to use Javascript, which I do not have enough knowledge of. I can hide it, that can be done in css (but it might screw up the question logic)
- I really would not know how to do this.
Can anyone help?
Thank you,
Tammo
PS: since more people might run into this, I have placed it here. Of course I hope that the relevance in Array by Column can be fixed, then we do not need this solution....