TOC PREV NEXT INDEX INDEX

Working with the FormMail script

The FormMail script enables you to incorporate form letters into your Web site. Form letters let your site's visitors fill out forms online and then submit that information to you via email. The FormMail script provides many more options than the CGI Email script and enables you to create more complex, customized forms.

SiteControl's FormMail Manager makes it easy for you to customize and control the operation of the FormMail Script. You select the fields you want to use and customize them to fit your needs, then the FormMail Manager generates the HTML you need to paste into your site.

To access the FormMail Manager, select Website Tools > Free Scripts and then click FormMail.

The FormMail Manager enables you to use the following fields in your forms:

Field
Description
email
Creates a form field for the user to input his or her email address.
env_report
Enables you to incorporate environmental variables (such as user's browser type and domain) in the form.

Valid values:
REMOTE_HOST. Returns the name of the remote host making the request.
REMOTE_ADDR. Returns the IP address of the remote host.
HTTP_USER_AGENT. Returns the user's browser type.
REMOTE_ADDR. Returns the name of the remote host making the request.
missing_fields_redirect
Enables you to specify a URL to which users will be redirected if one or more required fields are not completed.
phone
Creates a form field for the user to input his or her phone number.
print_blank_fields
Enables you to specify whether all fields are to be included in the return email regardless of whether they have been completed.
Valid values:
0. False. Blank fields are not included in return email.
1. True. Blank fields are included in return email.
print_config
Enables you to specify which of the config variables to include in your return email. By default, no configuration fields are included.
realname
Creates a field into which users can input their real names. The value of this field will also be placed in the From: line of the message header.
recipient
Enables you to specify the address to which the form is to be submitted. Typically, this field is hidden.
redirect
Enables you to redirect the user to a different URL upon submittal of the form, rather than displaying the default submittal response. To specify the URL to which you want to redirect visitors, enter the URL in the Value field.

You can also use this field to give the user the ability to specify the URL to which they want to go after they submit the form. To do this, clear the Hidden field, leave the Value blank and provide a descriptive label for the field.
required
Enables you to specify the fields that must be completed before the form can be submitted. To specify the fields, enter the field names separated by commas. For example, to make the email and phone field required, enter "email,phone" as the field value.
return_link_title
Enables you to specify the text of the link that will return the user to the page specified by the return_link_url field.
return_link_url
Enables you to specify the URL associated with the return_link_title. If you selected the redirect field, this field will be disabled.
sort
Enables you to specify the sort order for the data included in the return email. You can sort the data alphabetically or specify a custom sort order. If you do not use this field, the returned information will be sorted in the order in which the browser sends the information to the script, which typically is the order in which the fields appear in the HTML code.

To sort alphabetically, enter "alphabetic" as the field value.
To specify a sort order, type "order:" and then list the field names in the proper order, separating each with a comma.
For example: order:name1,name2,etc.
subject
Enables you to specify the text that appears in the Subject field of the return email. If you do not select this option, then the text "WWW Form Submission" will appear as the message subject. To allow the user to specify a subject, clear the Hidden check box and specify a descriptive label for the field.
title
Enables you to specify the title and header that appears on the resulting page if you do not specify a redirect URL.
For example, if you want the page that display immediately after form submission to be titled "Form Results Feedback" then you would enter that text as this field's value.

To use the FormMail Manager:

  1. In the CGI Scripts Manager, click FormMail. The FormMail Manager appears.
  2. In the Form Name field, enter a name for the form you are creating.
  3. Click Active next to each optional form field you want to include in your form.
  4. For each active item, enter the appropriate Value and/or Label. For detailed descriptions of each of these fields, see the table on the previous page.
  5. For each active item, select or clear the Hidden check box as appropriate. For detailed information on each of these fields, see the table on the previous page.
  6. To create a new field, click Add a new field. A new blank field is added to the bottom of the page.
  7. Enter the field Name, Value and Label and then select either Active or Hidden.
  8. Repeat steps 6 and 7 as necessary. When you are finished, click Generate HTML. The FormMail Manager generates the HTML that you need to paste into your Web page.


Way2Host
support@way2host.com
© 2003 Way2Host
All rights reserved.


TOC PREV NEXT INDEX INDEX