Welcome to the LimeSurvey Community Forum

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

Deactivate the submit button

  • jbarrouillet
  • jbarrouillet's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 weeks 5 days ago #264959 by jbarrouillet
Deactivate the submit button was created by jbarrouillet
Hi,

I upgrade a plugin GetStatInSurvey to make a SUM on a numeric field.
With Javascript, i can put the sum in a masked fiel to have the sum data in a field.

If this SUM + a numeric field value is over a defined max value, i want to deactivate the submit button. How can i deactivate the submit button to not send the answers.

This development is to imitate the quota gestion, but not whith 1 by 1 answer. It's for a family or groupe inscription to a activity.

Exemple :
A 12 quota activity. First answer, 1 family with 5 people. Next answer, a family with 3 people. So, when a third family with 5 people want subscribe, i made a SUM, that give me 8 + 5 people, that is over 12 quota. And, in this case, i want deactivate Submit buton.

I hope it's clear !   

Thanks

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 weeks 5 days ago #264960 by DenisChenu
Replied by DenisChenu on topic Deactivate the submit button
Maybe you can have a look at manual.limesurvey.org/StatFunctions

The sample survey (used as test) seems near your need.

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.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 weeks 5 days ago #264963 by Joffm
Replied by Joffm on topic Deactivate the submit button
Hi,
my first idea was to set the max.value of your input to the remaining places and display a message "Only {xx} places available"
And if there are no more, don't show the question but only display the message "Sorry, full", or whatever.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose