Insert a mail form
- Insert a new content element as usual
- From the list of content types, select Mail form and position the content as appropriate
Mail form wizard
Save the content element to reveal the Forms Wizard button right of the configuration box
Click the button to start the wizard
In the forms wizard display, choose a Type from the Type drop-down menu. See form element types
Type a Label for the field.
This is the text that appears next to the field in the form
(optional) Check the Required box to require the content be filled/checked before visitors can submit the form
Click the button to refresh the work area
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
(optional) Set a Size to define the display size of the field
(optional) Set a Max to define the maximum length of the text input in this field
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
Click the button to add another field
Continue adding fields from step 3 until all form fields have been created
Set the Send button label, which is the text that displays in the submit button for the form
Set the Subject, which is the subject line that will be used in the email submitted using the form
Set the Recipient email who will receive the email submitted using the form. Separate multiple addresses with commas.
Warning about incorrect email addresses.
(optional) Check the HTML mode enabled box if messages should be sent using HTML rather than plain text
Save and close the wizard
- 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.
- Set the Jump to page by clicking the button
- 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.
This Flash movie demonstrates the above steps to create a mail form
Form element types
Inserts a short text input field (one line). May have short label
or a long label
Inserts a long text input field
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.
Inserts a binary check box (checked or not checked -not- "choose multiple of the following")
Inserts a "choose one of the following" radio button 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.
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.
A method to submit a response automatically, without input from a Web visitor.
Adds a submit button to the form, though one is inserted by default so there is no compelling reason to use it.
You can disregard this option.
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 "CMS Notification" but you can optionally change this behavior.
Option 1 - "From" a department contact (fixed address)
You can set a fixed "from" address, which is useful if you want to receive failed message submissions or configure Inbox rules to route the message submissions to a different folder than CMS publish notifications.
Configure a fixed "from" email address by pasting the following two configuration lines into the form configuration field, updating the email address and display name to appropriate values for your use case.
| from_email=hidden | firstname.lastname@example.org
| from_name=hidden | Your-Display-Name
Option 2 - "From" the visitor
To make the message appear from the person who completed the form instead, you must have two fields on your form. The mailform wizard should have one Input field called name another called email, (case-sensitive) as shown below.
Warning: when using this technique, if a visitor enters a email@example.com email address, the email message may be quarantined by the Office365 Email service because NDSU is not authorized to send email on behalf of other domains such as yahoo.com, aol.com, nd.gov, etc. Office365 Inbox rules will not change quarantine behavior and you will need to manually check and release messages from the Office365 quarantine or wait for a weekly quarantine email notification.
To avoid this behavior, do not use a Field value of email (delete the input or change the Field value to something other than "email").
The mailform configuration field will then display two lines as described:
The field might look like (the bold text is the critical text)
Full Name | *name=input,40 | Full name
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.
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
- Add a field of Type: "Hidden value"
- Set the Field: value for the hidden field to match the Field: value of the check box field, e.g. both "contact"
- Set the Value: of the hidden field to 0
The above steps will be displayed in the wizard like
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
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.