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


  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 15 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 15 years ago #
  3. yuniar

    Another easier option would be using the "Single Line Text" field instead of "Email" field.


    MachForm Founder

    Posted 15 years ago #
  4. timmer
    Member

    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 12 years ago #
  5. timmer
    Member

    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 12 years 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 12 years ago #
  7. timmer
    Member

    <<<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 12 years ago #
  8. yuniar

    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 12 years ago #

RSS feed for this topic

Reply