This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
remove email validation error on form
Started 15 years ago by machformrocks | 8 posts |
-
Is it possible to remove the email validation on the form when the person enters their email as "junk"
Is there a way to stop the following validation error messages...
--- Big Red Box ---
There was a problem with your submission.
Errors have been highlighted below.This field is not in the correct email format.
Posted 15 years ago # -
Hi,
I'm curious why you want to do that :) , however you can remove email validation. To do so you should edit "post-function.php", search around line 289 you will find these code :
$rules[$element_name]['email'] = true;
replace with this
if ($form_id != '2') { $rules[$element_name]['email'] = true; }
in that example email validation will be skipped when form id = 2, otherwise the form will have email validation.
MachForm Support
Posted 15 years ago # -
Another easier option would be using the "Single Line Text" field instead of "Email" field.
MachForm Founder
Posted 15 years ago # -
How would I change the syntax below to ignore email validation on form_id's 1,2 & 3?
$rules[$element_name]['email'] = true;
replace with this
if ($form_id != '2') {
$rules[$element_name]['email'] = true;
}in that example email validation will be skipped when form id = 2, otherwise the form will have email validation.
Posted 13 years ago # -
Could I just make the change below to ignore email validation on all form_id's?
$rules[element_name]['email'] true;
to
$rules[element_name]['email'] false;
Posted 13 years ago # -
If you no need the mail validation, I think you can use "single line text" field instead of email address. It's better.
MachForm Support
Posted 13 years ago # -
<<<If you no need the mail validation, I think you can use "single line text" field instead of email address. It's better. >>>
Yeah, but if you use single line text you cannot make the reply to address the users email address.
Posted 13 years ago # -
Yes, you can set the code like this:
$rules[element_name]['email'] = false;
I'm wondering why would you like to remove the validation though?
MachForm Founder
Posted 13 years ago #
Reply
You must log in to post.