Basic Procedure for Creating a Webform
This page outlines the basic procedure for creating a Webform and adding it to the website. The procedure includes:
- Creating the Webform
- Creating the page that will hold the Webform
- Creating the confirmation page that displays after a website visitor submits the form
- Creating the email message that is sent to the website visitor who submitted the form and configuring the form to send this email
- Creating the email message that is sent to the moderator of the form and configuring the form to send this email
- Setting the form's availability on the website
Step 1: Create the page that will hold the Webform
- Create a new page using the Webform template
- Enter the introductory content into the Body WYSIWYG
- Should include a message on what denotes required fields
- Should include any special directions for filling out the form
- If the form page is within a site section, use the MENU SETTINGS field in the right column to place the page within the section
- Uncheck the Published check box
- Save the page
Step 2: Create the confirmation page
- Create a new page using the Content template
- Enter the confirmation messaging into the Body WYSIWYG
- If the page is within a site section, use the MENU SETTINGS field in the right column to place the page within the section
- To exclude the page from the site’s XML sitemap
- Expand the SIMPLE XML SITEMAP field in the right column
- Expand Default
- Select the Do not index option
- Uncheck the Published check box
- Save the page
- View the page and copy the path following https://dev.lr.edu
Step 3: Create the Webform
- Go to Structure > Webforms
- Click Add Webform
- Enter the Title and Administrative Description
- Click Save button
Step 4: Build the form fields
- Click Add Element
- Select the type of form field to add
- Configure the field using the panel on the right side of the screen
- Max length setting under FORM DISPLAY
- Required field setting under FORM VALIDATION
- Click Save button at the bottom of the panel
- Repeat steps 1 through 4 for each form field
- Click Edit on the Submit buttons line (CMS adds submit button automatically)
- In the panel on the right side of the screen, enter the text for the button into the Submit button label field
- Click Save button at the bottom of the panel
Step 5: Set the form to redirect to the confirmation page
- Click the Settings tab
- Click Confirmation
- Under CONFIRMATION TYPE, select the URL (redirects to a custom path or URL) option
- Expand the CONFIRMATION EMAIL area
- Paste the path of the confirmation page into the Confirmation URL field
- Click the Save button
Step 6: Set up the form to send an email to the submitter
- Click the Settings tab
- Click Emails/Handlers
- Click the Add Email button
- Configure the settings in the panel on the right side of the screen
- In the SEND TO area, select the email address in the To email field
- To use the value of the Email field in the form, locate the field of the ELEMENTS section of the options
- In the MESSAGE area update the following
- In the Subject menu, select the Custom subject… option
- In the text field that displays below the Subject menu, enter the email subject line
- In the Body field, select the Custom Body option
- Enter the custom confirmation message into the WYSIWYG editor
- To include the value of a form field, use this format:
[webform_submission:values:job_code]
The last portion of the format is the KEY value of the form field
- To include the value of a form field, use this format:
- In the SEND TO area, select the email address in the To email field
- Click the Save button at the bottom of the panel
Step 7: Set up the form to send an email to the form moderator
- Click the Settings tab
- Click Emails/Handlers
- Click the Add Email button
- Configure the settings in the panel on the right side of the screen
- In the SEND TO area, select the email address in the Custom To email address field
- In the text field that displays below the To email menu, enter the email address (for multiple addresses, use a comma separator)
- In the MESSAGE area update the following
- In the Subject menu
- Use the default option to use a subject line that uses general text + Title of page the Webform is in
Webform submission from: Z Sample Request MBA Program Information - Select the Custom subject… option to use a custom subject
- In the text field that displays below the Subject menu, enter the email subject line
- Use the default option to use a subject line that uses general text + Title of page the Webform is in
- In the Body field, set the content of the email
- To use the default message that lists the values of the form fields, select the Default option
- To use a custom message, select the content of the email Custom Body option
- Enter the custom message into the WYSIWYG editor
- To include the value of a form field, use this format:
[webform_submission:values:job_code]
The last portion of the format is the KEY value of the form field
- To exclude any fields that have not been filled in, check the Exclude empty elements check box
- To exclude check box form elements that have not been checked, check the Exclude unselected checkboxes check box
- In the Subject menu
- In the SEND TO area, select the email address in the Custom To email address field
- Click the Save button at the bottom of the panel
Step 8: Pull the form into the page created in Step 1
- Open the page that will hold the form
- In the Webform field, select the form
Step 9: Set the form’s availability on the website
- Open the page that will hold the form
- Expand the WEBFORM SETTINGS area
- To have the form be visible on the page, select the Open option
- To have the form visible for a certain period, select the Scheduled option
- Enter the Open and Close dates
- After the Close date has been reached, the form will not display on the page; a message displays in its place
- Click the Save button
Step 10: Publish the Webform page and the Confirmation page
- Open the page that will hold the form
- Check the Published check box
- Click the Save button
- Open the confirmation message page
- Check the Published check box
- Click the Save button