DISABLE A BUTTON BEING PRESSED TWICE - after validation
Budget: $30 – $250 USD
Prevent button being pressed more than once AFTER the form script executes
please note form validation errors may come in which case we dont want to disable the button on 1 click
IF there is no errors in the validation form and the form script activates (it may call code from other server) etc then and only then will the button be disabled
please be careful with the subtle details
the form script does 2 things after pressing submit
1. it checks to see if form is valid i.e no invalid entries if there are invalid entries a warning is loaded from MessageStack if there are no errors it proceeds to part 2 ( the actual main function)
2. it processes the script function e.g SEND EMAIL enquiry
DISABLE BUTTON strategy
many coders are disabling the button from the get go even before step 1 has completed the disable of the button must only occur assuming step 1 has been completed and passed so we are EXECUTING step 2. then and only then will the button be disabled for 2nd click
Example:
suppose i have a contact form
Name:
Enquiry:
SEND BUTTON
if i press the SEND BUTTON it will NOT DISABLE immediately cos it has to run the validation check first and assuming that passes it proceeds to run the send script to send the email enquiry its during this process we need the button disabled
if the validation fails we must NOT disable the button
e.g it says Your name must be a minimum of 5 characters or your email is invalid then the SEND BUTTON should not be disabled otherwise the user is locked out and needs to refresh page
PLEASE NO TIME WASTER
basically i have a situation where i have
VALIDATION ERROR = 0 SEND SCRIPT = TRUE BUTTON DISABLE = FALSE
and i need
VALIDATION ERROR = 0 SEND SCRIPT = TRUE BUTTON DISABLE = TRUE
please note form validation errors may come in which case we dont want to disable the button on 1 click
IF there is no errors in the validation form and the form script activates (it may call code from other server) etc then and only then will the button be disabled
please be careful with the subtle details
the form script does 2 things after pressing submit
1. it checks to see if form is valid i.e no invalid entries if there are invalid entries a warning is loaded from MessageStack if there are no errors it proceeds to part 2 ( the actual main function)
2. it processes the script function e.g SEND EMAIL enquiry
DISABLE BUTTON strategy
many coders are disabling the button from the get go even before step 1 has completed the disable of the button must only occur assuming step 1 has been completed and passed so we are EXECUTING step 2. then and only then will the button be disabled for 2nd click
Example:
suppose i have a contact form
Name:
Enquiry:
SEND BUTTON
if i press the SEND BUTTON it will NOT DISABLE immediately cos it has to run the validation check first and assuming that passes it proceeds to run the send script to send the email enquiry its during this process we need the button disabled
if the validation fails we must NOT disable the button
e.g it says Your name must be a minimum of 5 characters or your email is invalid then the SEND BUTTON should not be disabled otherwise the user is locked out and needs to refresh page
PLEASE NO TIME WASTER
basically i have a situation where i have
VALIDATION ERROR = 0 SEND SCRIPT = TRUE BUTTON DISABLE = FALSE
and i need
VALIDATION ERROR = 0 SEND SCRIPT = TRUE BUTTON DISABLE = TRUE