Results 1 to 4 of 4

Thread: Required field(s) validation Question

  1. #1
    Join Date
    Jan 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Required field(s) validation Question

    1) Script Title: Required field(s) validation

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...uiredcheck.htm

    3) Describe problem:

    Not a problem as so much a question. I need a script like this but also wanted the option that if a particular field within the form isn't filled in correctly it will notify the user. In simpler terms, I have a form for award applicants and one field that is required is a word that ensures me that my visitors have read my terms. Is it possible to have the notification know when that field isn't filled in correctly with a specific word?

    I hope I'm making sence here.

  2. #2
    Join Date
    Jan 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Any takers?

  3. #3
    Join Date
    May 2007
    Location
    England, UK
    Posts
    235
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Default

    You could do it with some PHP e.g.

    PHP Code:
    <? 
    if ($_POST['field'] == "The Word")
       {
       print 
    "Success!";
       }
    else
       {
       print 
    "You have entered the value incorrectly";
       }
    ?>

  4. #4
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    To achieve the result you don't have to use any server-side tool like PHP (It is also possible with PHP to accomplish this work). You can use some simple JavaScript code to do so.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •