Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formmail.pl

Status
Not open for further replies.

pcs800

IS-IT--Management
Apr 9, 2002
339
US
How do I make a form field mandatory in a form that uses formmail.pl?


Eric VanLandingham
The Bargain Monkey
 
You'll have to validate it using either javascript at the client side, or check for values in the perl script, and if there's no values, pass the form back with a message

The choice as they say is yours

Are you using a recent version of formmail.pl? Older versions are susceptible to abuse from spammers


HTH
--Paul
 
yes, i know about the spamming thing.
I put <input type=hidden name="required" value="email">
in the submit page containing the form, but it does not work.

Eric VanLandingham
The Bargain Monkey
 
LIke Paul said, you'll need to create either a client side javascript to check the contents of "required" or test the value of "required" in your cgi script.

IMHO, you should do both. Go to the javascript forum and do a search on "form validation" and you'll get 100's of examples on how to write a javascript validation function and how to implement it on your HTML page.

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top