- Posts: 32
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Deactivate the submit button
- jbarrouillet
-
Topic Author
- Offline
- Junior Member
-
Less
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
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
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13820
- Thank you received: 2521
3 weeks 5 days ago #264960
by DenisChenu
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.
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.
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
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13196
- Thank you received: 4057
3 weeks 5 days ago #264963
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
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
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.