Welcome to the LimeSurvey Community Forum

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

Hiding answer variants after exceeding the number of answers

  • alorenc
  • alorenc's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 11 months ago #216210 by alorenc
Hello, I need help to hide the answer variants from the list when I exceed the number of possible answers.

Example Limesurvey: v3.25.19:
I have a training list, after selecting a training, a list of available dates is displayed, the point is that a certain number of people can sign up for a given date, I would like to hide such a term on the list

1. The use of quotas comes to mind, but unfortunately that is true of the whole question and not of the specific answers.
2. I found a plug: "getStatInSurvey" but it requires JS code injection from WYSWING editor (this option is not for me).
3. I know I can refer to the variant answer in the style of Q01_A01, according to the plugin mentioned above, I can get answers regarding the particular variant [Q01.nb.A01]. Can I then set the expression to hide the answer when [Q01.nb. A01] will return 30?

Possibly how else to solve it
The topic has been locked.
  • alorenc
  • alorenc's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 11 months ago #216211 by alorenc
example ad1:
- adds an amount of 10 for Q01_A1
- adds an amount of 30 for Q01_A2
- performs tests and actually works separately.

Unfortunately, after exhausting the amount for the variant, if the user chooses this variant, I redirect him to the page with the message. This is not a satisfactory solution, because after returning to the form, he has to fill it in again.

If the above solution worked, wouldn't it be possible to somehow hide the variants of the answers? For example, from the level of conditions? Or from a survey template?

PS. What are question templates - how to define them, because I don't have defined ones, and maybe it can be set in them?

PS2. Alternatively, the mentioned plug-in can be used for this purpose, e.g. from a template or conditions?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #216216 by DenisChenu
getStatInSurvey work only for single choice question …

> You can show statistics from this question type : single choice, numeric and equation.

gitlab.com/SondagesPro/ExportAndStats/ge...Survey#documentation

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.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #216223 by Joffm
Well, though I do not know, why it's no option

2. I found a plug: "getStatInSurvey" but it requires JS code injection from WYSWING editor (this option is not for me).

here a simple example with this plugin.

 

File Attachment:

File Name: limesurvey...7844.lss
File Size:26 KB



Otherwise you may wait till version 4.x. is declared stable, or use it anyway.
There is a core plugin "statFunctions" built in with two functions "countStat" and "countStatIf"
 

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: alorenc
The topic has been locked.
  • alorenc
  • alorenc's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 11 months ago #216226 by alorenc
version 4.x is stable - since when?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #216229 by Joffm
I wrote"Wait till it is declared stable".

But - of course - you should install it and use it -> to find and report still existing bugs.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, alorenc
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #216255 by holch
There is not going to be a stable LS4. Seems like we'll go straight to LS5 now.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose