Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Form validation & Submission

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #23761
    ikthius
    Member

    hey everyone,

    I have a form script in PHP and it works well, but it does not validate the HTML Fields.

    I found on a site a javascript validation, it works well in test mode, which is before it is sent to the PHP script to email.

    I have the script starting like this for testing the javascript validator:

    Code:

    without the validation I normally let the srcipt work.

    Code:

    How can I get the validation to work and when it is all valid, it automatically posts to the contact php?

    within the javascript I have this piece of code:

    Code:
    if (reason != “”) {
    alert(“Some fields need correction:n” + reason);
    return false;
    }

    alert(“All fields are filled correctly”); //this is the part that says everything is done correctly
    return false;
    }

Viewing 1 post (of 1 total)
  • The forum ‘Other’ is closed to new topics and replies.