homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

Required fields Form2Email

 7:19 am on Apr 11, 2009 (gmt 0)

Hi all,

Just wondered if anyone could tell me how to get the email and telephone number fields checked for valid data on a form being proccesed by Form2Email CGI script done.




 4:16 pm on Apr 11, 2009 (gmt 0)

Most of us here are coders/programmers and are rarely familiar with off-the-shelf free scripts. Did you try what is listed in their scant documentation [form2email.net]? (Scroll down from there to "Using the form for required fields")

Set the field names in your form that require data. The script can check for any data, just numbers or just an email address.

<input type="hidden" name="required_fields" value="field,name">
<input type="hidden" name="required_fields_numbers" value="field,name">
<input type="hidden" name="required_fields_email" value="field,name">


 8:28 pm on Apr 11, 2009 (gmt 0)

Hi rocknbil,

Long time no hear, cant count on onw hand how many times you have helped me out.

Anyways, I have figured it out and is running fine.

thanks anyway.

Take care-have a great Easter



 10:56 pm on Apr 11, 2009 (gmt 0)

And . . . . what did you do? (For those asking the same q! :-) )


 6:44 am on Apr 12, 2009 (gmt 0)

In this section of the script: Advanced Settings required fields-you will find the setting for required fields.

In between the enclosed brackets place a name of the form field you would like to make required, either just any entry, either letters or numbers in the @required_fields.

So If you want a name and comments text boxed filled in, add a name="" to your form field, like so:

<input name="surname" id="surname" type="text" />
<textarea name="comments" cols="35" rows="5" id="comments"></textarea>

And ensure that this corresponds with what you have in the enclosed brackets on the required_fields. So above for instance I have a text box for customers name, and a text area for comments, and have made them both required fields.

If you have a form field to collect an email address, then you just do the same thing.

<input name="mailadd" id="email" type="text" />

As you can see, I have named the form field for email collection as "mailadd" and also called it the same in the script below.

my @required_fields = (surname,comments);
my @required_fields_numbers = ();
my @required_fields_email = (mailadd);

If you have a field for telephone number the same applies.

Hope helps anyone.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved