Form Container Component
AEM has a Form Container Component that authors can implement so that visitors can send you information through your site, as opposed to through email. This can be especially useful if your department needs to collect information in a complete, consistent format, because forms can be set to require certain fields and make others optional. Forms can be returned to you via the workflow you specify.
When should it be used?
Use the form container component when you need a way for visitors to communicate with you through your site in a consistent format, that is easily organized and tracked.
Some examples include RSVPing to an event, joining an email listing, submitting content, or providing a suggestion box.
The form container component is also useful for occasions where direct emails are not desired.
Implementing the Form Container Component
Visit Creating a Form to learn how to create and setup the Form Container component.
Form Component Editing Options
Start of Form Editing Options
Click on the Edit button at the Start of Form bar to access the form's in-component editing options.
Action Type - This specifies what happens to the submitted form content. There are two options; Store and Mail Content (the default) and Mail To. Each Action Type option has its own set of properties.
The Store and Mail Content setting stores all form data in a chronological easy-to-view format in AEM's Bulk Editor, and allows the data to be exported as a spreadsheet for programs like Excel to use. It also has the added capabilities of sending an email confirmation to the submitter and notifying the form owner of a new submission.
Content Path - This is where the form data is located. Do not edit this field.
View Data - Click this button to view the submitted form data in the Bulk Editor.
Email Template Path - Attach the email template text files here. When a form is submitted, an email is sent out according to each email template text file. Common templates include notification and confirmation email templates.
The Mail To option emails each submission as it is submitted to a specified email address(es), and is useful for handling form data individually
From - Enter the email address that the email should come from.
Mailto - Enter the email address of the person to send the form to.
CC - Enter the email address(es) of any cc's.
BCC - Enter the email address(es) of any bcc's.
Subject - Enter the subject for the email.
For more information on handling form submissions, visit Form Data Handling Options.
Thank You Page - Authors can build a 'thank you page' that the form will take a visitor to upon submitting it. If you choose to have the form redirect the visitor to a thank you page, click on the magnifying glass symbol to navigate to the thank you page. Leave this field blank to re-display the form after submission.
End of Form Editing Options
Show Submit Button - Check this box to make the form's Submit button appear.
Submit Title - Label the Submit button. If left blank, it will read 'Submit'.
Submit Name - An identifier for if there are multiple submit buttons used in your form.
Show Reset Button - Select check box to make the Reset button visible.
Reset Title - The name that appears on the Reset button.
Description - Information that appears below the button.
Advanced Form Features: Adding Toggles
There may be cases where you want to hide and show form elements, descriptive text, or instructions based on a user's input before they submit the form. This can be achieved by adding toggle classes to inputs and other components. See Advanced Form Features: Adding Toggles for detailed instructions.