Welcome to the LimeSurvey Community Forum

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

hide groups

  • xiaomeng0603
  • xiaomeng0603's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 10 months ago #217133 by xiaomeng0603
hide groups was created by xiaomeng0603
hi

I want to hide two groups on my questionnaire. The group"Random Number for VehiclePrice and Annual Taxes "function is to generate random numbers; the group "Saving Part Ⅲ Value" function is saving the filled numbers. The respondents need not see both groups. Could you help me to hide both groups without influence their functions ?
 
Thank you
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #217134 by Joffm
Replied by Joffm on topic hide groups
Hi,
depends on the content of the groups.
Usually you set the relevance equation of this group to something that is always FALSE. 0 is sufficient, as this means FALSE in php.

But if you are the third person who deals with this choice survey, there are javascript function in this first group.
If you hide the group they will not work.
You have to hide the single questions in the javascript with 
$(thisQuestion).hide();
here
Code:
        }
 
    $(thisQuestion).hide();    
    });
 
    // A function to shuffle arrays

Usually if you hide ALL questions in a group by "Always hide this question: ON" the entire group is not displayed.
In your case the questions are only hidden by javascript; so the group itself will be displayed, more or less as an empty frame and a "next" button.
Therefore you have to include at least one visible question, as a "text display" with some explanations.

These are the things you have to consider.
A group is hidden exactly like a question : relevance equation == FALSE
But it is different if there is javascript.

Easy to understand.
The relevance equation hides the question while creating it on the server, so the javascript that runs in the client's browser will not be existing.
And the other way: If the javascript hides the question in the browser the rest of the page (the group) will be still existing.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
2 years 10 months ago #217136 by jelo
Replied by jelo on topic hide groups
I try to avoid hiding complete groups, cause LimeSurvey tends to ignore them.

I move equation questions into relevant groups and just hide questions via CSS class hidden. That way I'm sure, every group is run by LimeSurvey.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #217142 by DenisChenu
Replied by DenisChenu on topic hide groups

I try to avoid hiding complete groups, cause LimeSurvey tends to ignore them.


 
? I always use group with all question hidden inside. I never have issue. I'm happy to see a bug report.

And more sometimes : i create multiple group with hidden question.
1 group : SET by token
2nd group : Choose if Choice is empty (by condition/relevance)
3rd group : Choice and setChoice (hidden quetsion both)
4rd group : the survey

Only the 4rd group are shown when come back to survey.

@ xiaomeng0603 : just set all questin in this group hidden by attribute manual.limesurvey.org/Question_type_-_Eq...uestion_.28hidden.29
 

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.
More
2 years 10 months ago #217166 by jelo
Replied by jelo on topic hide groups

I always use group with all question hidden inside. I never have issue. I'm happy to see a bug report.

I never use equation questions in hidden groups and I have no issues either ;)
 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #217168 by Joffm
Replied by Joffm on topic hide groups
Let's come back to the initial question.
Here the first group consists of eight questions that each create two random numbers by javascript.
Seems to be a kind of seminar work of this university. Three different people startet threads showing the same look & feel.

Now you cannot hide the entire group nor the questions by relevance equation. The javascript will not work.
But if you hide each question - either by css class "hidden" or in the javascript itself - there still the empty "group container" is displayed.


So there should be one visible question inside this group.
Just a text display that welcomes the people or explains the next questions (especially in this choice experiment)


 Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: tpartner
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 10 months ago #217177 by tpartner
Replied by tpartner on topic hide groups
If JavaScript is involved, Joffm's answer is the relevant one. (pun intended :) )

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose