Appnitro Software Forums » MachForm 2

remove email validation error on form


  1. machformrocks
    Member

    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 3 years ago #
  2. redityo

    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 3 years ago #
  3. Another easier option would be using the "Single Line Text" field instead of "Email" field.


    MachForm Founder

    Posted 3 years ago #
  4. 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 9 months ago #
  5. 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 9 months ago #
  6. redityo

    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 9 months ago #
  7. <<<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 9 months ago #
  8. 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 9 months ago #

RSS feed for this topic

Reply