SBnet - When we say Internet, we mean business.


SBnet

Home 
Services 

Support 
About Us 
Employment 

Client List 

Terms of Service

Privacy Policy

Customer Quote

Advertisements
Warp 9 Inc. - Building Online Businesses
Providing Full
e-Commerce
Solutions

   
maps.com
The Place For Maps Online

How to set up a form on SBnet

To add a form to your web page, add the following lines of code to your page, and change the specified values to customize your form.

<form action="http://www.sb.net/cgi-bin/mailto" method="POST">
Make sure that you have the above to start your form.

<input type="hidden" name="followup-page"
value="http://www.yourdomain.com/thanks.html">

thanks.html is the page that the visitor will see after s/he has submitted the form. You can put any filename here.

<input type="hidden" name="recip" value="user@yourdomain.com">
change user@yourdomain.com to the email address you want the results of the form to be mailed to.

<input type="hidden" name="subj" value="form results">
You can customize the subject of the email you will receive with the results of the form.

Please enter your age.
<input type="text" name="age"><br>
Please enter your favorite color.
<input type="text" name="favorite_color"><br>
Please enter your eye color.
<input type="text" name="eye_color"><br>
<input type="submit">

Now add all the HTML tags here to customize your form.

<input type="hidden" name="required_fields" value="age, favorate_color">
You can require fields, if you choose to.  Simply list the required fields, separated by a camma followed by a space.

<input type="hidden" name="errorpage" value="/home/www/your_username/error.html">
In concordance with requiring fields, you can send the user to an error page, stating they didn't fill in all required fields. This link needs to be the fully quantified path to the html file, or else it won't work. Replace "your_username" with your login.
If you want to show which fields they didn't fill in, use the variable {missing_fields} (with the braces). e.g. You forgot to fill in these fields! {missing_fields}


</form>
Don't forget to end your form.

Auto Email Response
If you want to send an automated email message to the user filling out the form, add this code to the page:

What's your email address?
<input type=text name="your_email">

the variable "your_email" can be anything you want. The important part is to follow.

<input type=hidden name="autoemail_to_addr" value="your_email">
Notice the value: autoemail_to_addr accesses the value "your_email", which was filled in when the email address was asked for. As said before, the value "your_email" can be anything you desire, it's just important that they match up.

<input type=hidden name="autoemail_from_addr" value="me@mydomain.com">
<input type=hidden name="autoemail_from_name" value="My Name">

These are what the user will see in his auto email message in the "From:" field.

<input type=hidden name="autoemail_sendfile" value="/home/www/sbnet/user_name/formreply.txt">
This is the file that will be the body of the message the user will receive when the email is sent.

<input type=hidden name="autoemail_subj" value="Thanks for filling out my form">
This will be the subject of the email the user receives. It can be anything you want it to.

The above code will create the following form:
Note: Information beyond this point on this page is outdated, and will be updated shortly.

Please enter your age.
Please enter your favorite color.
Please enter your eye color.

For detailed documentation of this script, check out http://www.cold.org/~brandon/Mailto/

 © 1999 SBnet back to top