Setting up Form to Email using Web Forms

Updated on 20-October-2016 at 10:16 AM

Business Catalyst End of life announcement - find out more details.

Web forms enable visitors to inquire online and contact the owners of small businesses. This system lets you build forms that can alternately store form data in a database or forward the submitted data to an email address.

In this article, you learn how to configure a form to send the data to a user's email address, rather than storing it in the database. This strategy enables you to create a simple web form with email functionality. It forwards the details of a web form submissions to a predesignated email address.

To set up a web form to forward the submitted data, follow these steps:

  1. Create a web form .

  2. Insert the web form on a web page.

  3. Update the action URL in the source code of the form to use the format shown below: 


action="/Default.aspx?A=Form&Email=You@YourDomain.com&Subject=This+is+email+subject&EmailFrom=yourfromemail@YourDomain.com&ID=/DestinationPage.html"

In the example above:

  • &Email=You@YourDomain.com - The email address to which the submission is sent. Replace ?You@YourDomain.com? with your email address.

    Note: The email address that receives the form submission must exist in your sites CRM (customer database). Or, it must be an admin/email user of the site.
    If the email address used to receive these form submissions doesn't exist as a site user or in the CRM, then the email isn't sent. A notification is sent to the partner of the site advising them of this requirement.

  • &Subject=This+is+email+subject - The subject of the email. Make sure that you separate each word in the subject with the + (plus) sign.
  • &EmailFrom=yourfromemail@YourDomain.com - The From email address. Replace yourfromemail@YourDomain.com with the email address you want to use for the submission.
  • &ID=/DestinationPage.html - The URL of the landing page presented to the visitor after the web form has been submitted.

Note: If you want to use the numeric id of the destination page you need to use the PageID parameter. e.g &PageID=2642353.

When you configure the URL as described above, the form sends an email message containing the form data every time it is submitted.

Consider the following when using this strategy:

  • Details submitted in the form are not captured in the site's customer database. You can upgrade to a higher hosting plan to use this feature.
  • Web form submissions are not captured in the customer database as cases. You can upgrade to a higher hosting plan to use this feature.
  • Only one person (one email address) receives the details of the web form via email only. SMS text notifications cannot be sent.
  • The details of the web form submission cannot be emailed or displayed to the customer making the submission.
  • Make sure to set the method of the form to POST; this strategy doesn't work if the form is set to GET.

HTML and JavaScript form submissions

HTML tags and JavaScript are escaped or removed from all form fields which are included in the email body. Plain text links continue to work. Here are some examples:

  • white&blue becomes white&blue. Email clients that support HTML display it as white&blue
  • <a href="http://www.site.com/mypage">mysite</a> becomes mysite
  • <a href="http://www.site.com/mypage">http://www.site.com/mypage</a> becomes http://www.site.com/mypagee
  • http://www.site.com/mypage remains unchanged
  • <script>alert('test')</script> is removed