This script is used to send information from a form on your website to an email address. You must create a form that uses the GET or POST method and the action attribute is set to http://www.berrybros.net/cgi_bin/formmail.asp. Example:
<form method="POST" action="http://www.berrybros.net/cgi_bin/formmail.asp">
the elements of your form here
You then use hidden form fields to pass the information the script needs to process the form, the most important of which is the recipient. You set these hidden fields as shown below:
<input type="hidden" name="recipient" value="email@example.com">
Another benefit of the script is that it can check the syntax of a text field to verify that it is a valid email address. All you need do is create a text field with the name attribute set to email. Example:
<input type="text" name="email">
Here is a list of form field names you can use to modify how the script processes your form:
Description: This form field allows you to specify to whom you wish for your form results to be mailed. Most likely you will want to configure this option as a hidden form field with a value equal to that of your e-mail address. This is the only field required for the script to work properly.
Description: The subject field will allow you to specify the subject that you wish to appear in the e-mail that is sent to you after this form has been filled out. If you do not have this option turned on, then the script will default to a message subject: Form Submitted. Examples:
If you wish to choose what the subject is:
<input type=hidden name="subject" value="Your Subject">
To allow the user to choose a subject:
<input type=text name="subject">
Description: This form field will allow the user to specify their return e-mail address. If you want to be able to return e-mail to your user, I strongly suggest that you include this form field and allow them to fill it in. This will be put into the From: field of the message you receive. It will automatically be checked for syntax and will be automatically be required, you do not need to specify that it be required with the required field.
Description: If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made HTML page. You must include the http:// at the beginning of the URL. Example:
<input type=hidden name="redirect" value="http://your.host.com/to/file.html">
Description: You can now require for certain fields in your form to be filled in before the user can successfully submit the form. Simply place all field names that you want to be mandatory into this field separated by commas, NO SPACES (remember if you have an email field it is automatically required). If the required fields are not filled in, the user will be notified of what they need to fill in, and instructed to go back to the form they just submitted. For example, If you want to require that they fill in the address, name and phone fields in your form do this:
<input type=hidden name="required" value="address,name,phone">
Description: You can decide in what order the form fields will be displayed in the email sent. much like the required field you place all the names in the order you wish to see them separated by commas, NO SPACES. This field will also prevent any fields you do not wish to see in your email from being sent (e.g. all of your configuration fields). If you use the field, ONLY FIELDS YOU SPECIFY WILL BE SENT. All other fields will be ignored.
<input type=hidden name="order" value="address,name,phone">
Complete Form. If you right click on the page and select
'view source' you can see the fields in action.