Hi,
I have a form and I would like people to enter a set password in order to submit the form.
There will be a single password ( Ex:12345), after the password has been entered and all validation is checked the form will submit and send the email.
How do I add validation to the password field to check if the password that is entered is correct and the form is submitted?
I was reading the following -http://www.chronoengine.com/faqs/54-cfv4/cfv4-validation/2592-how-do-i-use-custom-serverside-validation.html - But it says at the bottom that V5 doesn't have custom server validation. So I set up the Event switcher and have the following code in it
<?php
$password =& $form->data['password'];
if ( !isset($password) || !$password || $password != '12345' ) {
$form->validation_errors['password'] = 'Please enter a valid password';
return false;
}
?>
The event switcher is at the top of the onload with an event loop in the fail
Thanks
Penny
I have a form and I would like people to enter a set password in order to submit the form.
There will be a single password ( Ex:12345), after the password has been entered and all validation is checked the form will submit and send the email.
How do I add validation to the password field to check if the password that is entered is correct and the form is submitted?
I was reading the following -http://www.chronoengine.com/faqs/54-cfv4/cfv4-validation/2592-how-do-i-use-custom-serverside-validation.html - But it says at the bottom that V5 doesn't have custom server validation. So I set up the Event switcher and have the following code in it
<?php
$password =& $form->data['password'];
if ( !isset($password) || !$password || $password != '12345' ) {
$form->validation_errors['password'] = 'Please enter a valid password';
return false;
}
?>
The event switcher is at the top of the onload with an event loop in the fail
Thanks
Penny