PDA

View Full Version : Required field(s) validation Question



webby
09-03-2007, 10:59 PM
1) Script Title: Required field(s) validation

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/requiredcheck.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.

webby
09-07-2007, 01:06 PM
Any takers?

jc_gmk
09-07-2007, 01:20 PM
You could do it with some PHP e.g.



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

codeexploiter
09-07-2007, 02:14 PM
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.