Web Sites and Ezine Design and Hosting

 

Forms to Mail Overview

Use Forms to Mail to encourage web site visitors to contact you. Features include:
  • Format the contact information for ease of reading,
  • Auto-respond with custom Email content to the web site visitor, and
  • Display a security code and require visitors to enter it, helping to ensure that the web form is being submitted by a visitor, not a spam robot.

Forms to Mail HTML Creation Wizard

Provide information to create an HTML snippet for your web page. Leave unwanted fields blank in the form below.

Copy and paste the resulting HTML into your web page. Add any extra form elements you need to complete your information capture.

Forms to Mail Creation
Recommended Parameters
Site domain name
Example: mysite.com
Site owner name
Example: First LastName

Site owner email address
Example: somebody@yoursite.com

Site owner email subject
Example: Response from website

Normal Web page response
Example: http://yoursite.com/thanks.html
Error Web page response
Example: http://yoursite.com/form.lasso
Site Owner Email Template and Optional Assistant
Owner email template
Example: http://yoursite.com/template.html
Carbon copy
Example: somebodyelse@mysite.com
Visitor Email Auto Response Template
Email auto response? No Yes
Email auto responder
Example: http://mysite.com/aresponse.txt
Email auto response subject
Example: Thanks for your visit
Form to Mail Generation
(click "Generate" and note the HTML below)

Note: You must name the web page containing the above code with a "lasso" extension, so that it will be processed by our system. Example file name: contact.lasso

 

Forms to Mail Documentation

Form parameter names must be spelled the same as in the example, except that names are case-independent. For example, use "ToName" or "toname" but not "to-name".

Required Form Parameters

ToName: Name of the primary recipient of the mail, normally the site owner. This will be encoded if you have selected the privacy setting in the wizard above.

ToAddress: Email address of the primary recipient. This will be encoded if you have selected the privacy setting in the wizard above.

Subject: A subject line to identify this message

FromName: Name of the sender, the website visitor

FromAddress: Email address of the sender. This address will be copied into a reply-to header in the Email message.

Recommended Form Parameters

NextPage: URL for a response page on successful processing of the form input. This is an opportunity to give the site visitor a nicely formatted response, one that matches other pages from your web site.

ErrorPage: File name for an error response page to be loaded when processing of the form input fails. This will normally be the same page as used for form input. To conditionally display the error message for the user, insert the following code at some prominent spot near the top of the form page:

[Lasso_comment]
     Display a helpful error message when form processing fails. [/Lasso_comment]
[if (var_defined ('errorMessageHTML') && $errorMessageHTML != '']
<ul>[Output ($errorMessageHTML, -encodeNone)]</ul>
[/if]

Internet Explorer will empty the content of form fields when a user returns to a form page by requesting Previous Page. Consequently, scripting must be manually applied to populate form elements following an error in form processing. To populate form elements, a value for each form element is retrieved from an array (hash or map) of post params. For example:

<input type="text" name="fromName" value="$postMap->find('fromName')">

Optional Form Parameters

RequiredValues: You may optionally name a list of parameters that you want Mailer to require with the hidden tag RequiredValues. For example, to require that the user enter something in the name, address and phone, use the following hidden tag.

<input type="hidden" name="RequiredValues" value="name, address, phone">

Carbon Copy: To carbon copy a secondary recipient with the message to the primary recipient, place the parameter CC in the list of parameters.

Formatted Report to the Site Owner: To combine the forms parameters with an HTML template and produce a formatted Email message, place the parameter "MailForm" in the list of hidden parameters.

<input type="hidden" name="MailForm" value="http://yourdomain.com/MailForm.html">

In the example, "MailForm.html" is the name of a text file that is stored on your web site. See below for more information on template content.

Auto Responder to the Site Visitor: To auto respond with an email message to the web site visitor, add "Responder" and "RespSubject" parameters to your form.

The text in the responder message may be HTML or plain text. Name the file containing your response to be with a suffix that is consistent with its content (.html or .txt).

The respName and respAddress parameters identify who the responder email will appear to come from. Normally, this will be the web site owner's name and address.

<input type="hidden" name="responder" value="http://yourdomain.com/ResponseFile.html">
<input type="hidden" name="respSubject" value="Thanks for Your Request">

In the example, "ResponseFile.html" is the name of a HTML file containing your response that is stored on your website. This file could be an ordinary web page.

Security Code: To help ensure that your site visitor is a real person and not spam software, you must include a security code requirement. Visitors type the letters as they appear on an image. See the output of the Forms to Mail Generation script above for exact content of this scripting. Be careful to include the entire script code with your form.

Submit Button: The submit button may be given any value you choose, as the submit parameter is ignored.

<input type="submit" name="submit" value="Send Request">

Formatting the Email Content

Create HTML Email messages for the Site Owner and/or the Site Visitor.

Create a standard HTML file containing the static information that you want to include. Populate the form with dynamic or fill-in fields. Each of the dynamic fields will be filled-in with data taken from the form. For example, to include a salutation, use the following:

Dear [$FirstName],

Test Your Form!

Be sure to self-test your implementation and contact support@webvalence.com if you have problems or questions.

 
 

(503) 335-3442 :: sales@webvalence.com :: Copyright 1997 - 2008 :: All Rights Reserved
WEBVALENCE is a registered trademark of WebValence Internet Partners