Check out the LimeSurvey source code on GitHub!

Hiding Groups / Relevance Question

More
4 years 11 months ago #75806 by tacman1123
I have some fields that I'd like to hide from the user when taking the survey, but give admin access to when reviewing and doing data entry.

If I create a question group called Internal Fields, can I simply set the Relevance to 0 (or false?) to have it always hidden from the user, and if I do that, will the values set by Default Values always be set and saved?

Or does returning a false value for group-level Relevance create Null answers?

The other solution would be to set each question in the group to hidden, but then I think I'm still left with a stub, the question group, with no questions, and I'd rather not have to set each one if group-level Relevance effectively hides my answers.

Thx,

Tac

Please Log in to join the conversation.

More
4 years 11 months ago #75810 by TMSWhite
When variables are irrelevant, they are always NULLed in the database.

However, if you have a group where all questions are hidden, the values are saved to the database, and the user never sees those questions (in fact, the user never sees the group at all - try /docs/demosurveys/ls2_group_relevance.lss)

In fact, that is a common way of dealing with parameters passed on the command line. If you have a query with &SGQA1=value1&SGQA2=value2..., and if they are valid SGQA codes, they will be put into $_SESSION on survey load. Then, if those SGQA codes are hidden variables in the first group, they will all be saved to the database. We don't support qcodes on the command line yet, but there is an even more powerful approach being designed for version 2.0.

Please Log in to join the conversation.

More
4 years 11 months ago #75851 by Mazi

TMSWhite wrote: We don't support qcodes on the command line yet, but there is an even more powerful approach being designed for version 2.0.

Tom, which approach/feature are you referring to?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form