Content | Navigation |

Insert a mail form

  1. Insert a new content element as usual
  2. From the list of content types, select Mail form and position the content as appropriate

Mail form wizard

  1.   Save the content element to reveal the Forms Wizard button right of the configuration box

  2. Click the Forms wizard button to start the wizard

  3. In the forms wizard display, choose a Type from the Type drop-down menu. See form element types

  4. Type a Label for the field.
    This is the text that appears next to the field in the form

  5. (optional) Check the Required box to require the content be filled/checked before visitors can submit the form

  6. Click the Refresh without saving button to refresh the work area

  7. Specify a unique name for the Field input. See special field names.
    This is the text used in the mail receipt and is not displayed to the visitor

  8. (optional) Set a Size to define the display size of the field

  9. (optional) Set a Max to define the maximum length of the text input in this field

  10. Type a Value for the field.
    This is the "placeholder" that appears before a visitor types their answer into the field.  It is required for accessibility

  11. Click the Add row below button to add another field

  12. Continue adding fields from step 3 until all form fields have been created

  13. Set the Send button label, which is the text that displays in the submit button for the form

  14. Set the Subject, which is the subject line that will be used in the email submitted using the form

  15.  Set the Recipient email who will receive the email submitted using the form.  Separate multiple addresses with commas.
    Warning about incorrect email addresses

  16. (optional) Check the HTML mode enabled box if messages should be sent using HTML rather than plain text

  17. Save and close  the wizard

  18. You are not done yet. Continue to Jump to page section

Jump to page

The Jump to page is the page the visitor will see after submitting the form.  This might be a page that reads "Thanks!" or "Someone will contact you."

Visitors are confused when you do not provide this receipt.  Without the Jump to page, no indication the form was successfully submitted will be provided.  See an example Jump to page/receipt.

  1. Set the Jump to page by clicking the Browse for records  button
  2. Select the page in the file browser that should display after the form is submitted

Dynamic receipt page

At this time, it is not possible to create a receipt page that includes the submitted form information through the CMS interface.

If a visitor should print a receipt of their request including their submitted answers, you should provide a note before the submit button directing visitors to print the form before submitting.

Incorrect email addresses

If you provide an incorrect/invalid email address in the Recipient email field, you will not receive the submitted mail forms.

Any forms submitted to the nonexistant email address cannot be retrieved.

You are urged to test mail forms after they are published to verify the accuracy of the Recipient email address.

Note: you can not test mail forms using a workspace preview link.

Form demonstration

This Flash movie demonstrates the above steps to create a mail form

Form element types

Input field

Inserts a short text input field (one line).  May have short label 

or a long label 
  

Text area

Inserts a long text input field 

Selector box

Inserts a drop-down selection menu (choose one) 

or a selection list (choose multiple).
Because the "choose multiple" form field type is difficult to use in some Web technologies, you should use it only when absolutely necessary.

Check box

Inserts a binary check box (checked or not checked -not- "choose multiple of the following") 

Radio buttons

Inserts a "choose one of the following" radio button field 

Password field

Inserts an input field showing stars instead of regular text.  You shall not prompt a visitor for their password, but this field type may be used to mask slightly sensitive data from persons standing behind a Web visitor as they complete the form. Remember that email is not a secure form of communication so you should not prompt the visitor for anything that is required by law or by policy to be encrypted or protected.

File upload

Inserts a file upload box/browse button.  Allows a Web visitor to include a file (as an email attachment) with their form submission.

Note The maximum file size that can be attached to the email message is 15MB (15728640B). If the visitor uploads a larger file and submits the form, the mailform recipient may still receive the email but it will not have any attachment.

Hidden value

A method to submit a response automatically, without input from a Web visitor.

Submit Button

Adds a submit button to the form, though one is inserted by default so there is no compelling reason to use it.

Property

 You can disregard this option. 

Label

Inserts plain text (with no associated input field).  This is useful for inserting detailed informational text before an input field.  For accessibility reasons, it should not be used as a substitute for a regular input label.

Special field names

Set email "from" address

By default, messages from the mail form will appear in the Recipient's email inbox from "Apache." To make the message appear from the person who completed the form instead, you should have two fields on your form. The mailform wizard should have one Input field called name another called email, as shown below.

The mailform configuration field will have two lines as described:

  1. Name
    The field might look like (the bold text is the critical text)

    Full Name | *name=input,40 | Full name

  2. Email
    The field might look like (the bold text is the critical text)

     Email Address | *email=input,40 | NDSU email address

Advanced tips for forms

Warning: These techniques require manual editing of the form configuration.  If the required syntax for the field is broken, the display or function of the form may not be as expected.  Hand edits of the form configuration in this manner are not supported.  Proceed with caution.

E-mail validation

To verify that the value entered in an e-mail field is formatted like an e-mail address, use the following code in the form configuration box

 Email: | *email=input | @NDSU e-mail address | EMAIL

where "Email:" is the field label
"*" declares that the field is required
"@NDSU e-mail address" is the default value that will be in the input field (required for accessibility purposes)
"EMAIL" declares that the format of the field should resemble an e-mail address

Submit checkbox values

By default, an unchecked checkbox will not return a "0" value if it is not checked.  This behavior is often preferred, as it simplifies the output of the form and displays only what the site visitor entered.  If this is not the behavior you desire, use the mail form wizard to

  1. Add a field of Type: "Hidden value"
  2. Set the Field: value for the hidden field to match the Field: value of the check box field, e.g. both "contact"
  3. Set the Value: of the hidden field to 0

The above steps will be displayed in the wizard like Type: Check box; Label: Contact me; Field: contact || Type: Hidden value; Field: contact; Value: 0

The form configuration field will display the following code after save

Contact me: | contact=check
 | contact=hidden | 0

The e-mail result without the extra hidden value (and the checkbox unchecked) is 

(note the lack of Contact=0), whereas the e-mail result with the extra hidden value (and the checkbox unchecked) is
Contact=0; Name=Amelia; Email=amelia@email.com

Tip: The same concept applies for other field types, such as text inputs.  When a field is not completed by the site visitor, the email does not include that line by default unless a secondary hidden value is included as described above.


Student Focused. Land Grant. Research University.

Follow NDSU
  • Facebook
  • Twitter
  • RSS
  • Google Maps

North Dakota State University
IT Help Desk: +1 (701) 231-8685
Physical address: IACC 206, 1320 Albrecht Blvd., Fargo, ND 58102
Mailing address: NDSU Dept. 4530 / PO Box 6050 / Fargo, ND 58108-6050
Page manager: Content Management System

Last Updated: Monday, December 03, 2012 6:10:50 PM