Welcome to the LimeSurvey Community Forum

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

Desacitvation of an option where it has been chosen X times

More
8 years 9 months ago #122962 by Josh
Hello!

I have created a survey with a question which has several options.
I want than, where one of those options has been chosen like 40 times, for example, this option will be desactivated (grey or hidden).

Is it possible to do that?
Or do I have to check the results file to desactivate it myself manually?

Thank you in advance for your answer,
Josh.
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 9 months ago #122963 by gabrieljenik
I believe there is no standard way of doing that.
You could do it by adding some Javascript development in the question body, that checks, via ajax, the number of times the options were used and disable the ones desired.

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The following user(s) said Thank You: Josh
The topic has been locked.
More
8 years 9 months ago #122965 by Josh
Okay, thank you for your answer. :)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 8 months ago - 8 years 8 months ago #122973 by DenisChenu
I think you can use beforeQuestionRender with the last version.
manual.limesurvey.org/BeforeQuestionRender
Find the count of each ansers (using quota or fixed number), getQuotaCompletedCount give you how to search in the survey DB.
For each answer up to ... the number
Get the 'answers' , use regexp or php.net/manual/fr/book.xmlreader.php to search for the line to remove (remove seems more easy to add 'readony" first).

Denis

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.
Last edit: 8 years 8 months ago by DenisChenu.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
1 month 2 weeks ago #258239 by Mazi

I want than, where one of those options has been chosen like 40 times, for example, this option will be desactivated (grey or hidden).

That's exactly what we have created a plugin for recently. For each answer option you can define how often it can be picked and if the maximum was reached, the option can either be hidden or disabled, depending on the plugin settings.

Check out the demo survey at ls6plugins.mysurveyhosting.com/index.php...38?newtest=Y&lang=en .
You can download the Limesurvey plugin at  survey-consulting.com/product/limesurvey...-garage-sale/​​​​​​​

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose