Using forms and Universal Email

One method for defining the properties of an email is retrieving information from form elements on the page to which the Universal Email server behavior is applied.

Values for properties can be retrieved from any form element for which a value can be set.

Form elements which allow multiple selections (radio groups, menus, lists) allow you to use the value for a specified selection.

The following email properties can be defined using form elements. Links direct you to the description of the property and the description provides implementation suggestions:
  • Redirect after Send
    A radio button value can be used to set the path for the redirect location. This may be useful in situations where the redirect location may vary dependent on a radio button selection.
  • Subject
    The subject line of an email can be retrieved from a textfield, using a pre-defined value or the value entered by the user when its parent form is submitted. Other options include using a hidden value set from other form elements (radio button selections, hidden form elements, etc.)
  • Importance
    The priority of the email can be defined by a value of a selected radio button, a textfield or hidden form element.
  • From
    The sender of the email can be retrieved from a value entered by a client in a text field, from a list of available recipients, a radio or checkbox selection, or a hidden form element.
  • To
    The recipient(s) of the email can be retrieved from a value entered by a client in a text field, from a list of available recipients, a radio or checkbox selection, or a hidden form element.
  • CC
    The recipient(s) of the email can be retrieved from a value entered by a client in a text field, from a list of available recipients, a radio or checkbox selection, or a hidden form element.
  • BCC
    The recipient(s) of the email can be retrieved from a value entered by a client in a text field, from a list of available recipients, a radio or checkbox selection, or a hidden form element.
  • Attachments
    Attachment location and file names can be retrieved from a value entered by a client in a text or file field, from a list of files, a radio or checkbox selection, or a hidden form element.
  • Body
    The content of the email can be retrieved from a value entered by a client in a text field, from a list of available recipients, a radio or checkbox selection, or a hidden form element.
To learn more about configuring values associated to form elements, please refer to Help > Using Dreamweaver > Making Pages Dynamic > Creating Interactive Forms

To set the value of a form element:

  1. Select a form element on the page.
  2. Within the property inspector, enter the information to be retrieved in the appropriate value field.
  3. For text and text area form elements this is the Init Val.
  4. For checkboxes and radio buttons, this is the Checked Value.
  5. For hidden form elements, this is the Value.
  6. For menus and lists, use the List Options dialog, accessible through the List Options button, to specify appropriate values for each item available in the list.

    Note: Form elements should be specified using unique names in order to distinguish them when information is retrieved from them.

To retrieve the value from a form element:

  1. Open the page which contains the form.
  2. Access the Universal Email dialog box.
  3. Click the tab which contains the property you wish to define.
  4. For the property to be defined, select the data bindings icon (lightning bolt). The data bindings interface will open.
  5. Expand the form listed and select the appropriate form element to retrieve the value from.
  6. Click OK. The necessary code populates the Universal Email dialog to retrieve the value from the selected form element.