The Drupal template system offers a feature to create an online form or survey for site visitors. Once a webform is completed and submitted, the user is sent a confirmation email. Additionally, the website administrator can receive an email notification that a from submission has been received. Form submissions can also be exported into an Excel spreadsheet.
- Step 1: Create the webform
- Step 2: Add and Configure Webform components
- Step 3: Configure Email and From Settings
- Step 4: Review Submission Results
- How to open or close a form
From the Admin toolbar, click Manage > click Add Content > click Webform
- Enter the title of the form
This is what will appear in large font at the top of the page.
- Enable CAPTCHA
If checked, it will add a CAPTCHA image to the end of the form to protect from bots.
- Body (see WYSIWYG editor instructions)
This is the text that will appear above the form; generally, it is used for a description or instructions.
- Generate automatic URL alias (Permalink)
Most times you want to let Drupal choose the automatic alias for the page. However, there are times when you want to specify a URL for a particular page. You can uncheck the “Generate automatic URL alias” box and enter your own custom URL. Be sure to avoid special characters when choosing a URL.
- Click Save once the webform is created. You can then begin adding form components.
There are many types of webform components (fields) that can be added to a form. The most common are text fields, email fields, and text areas. You can also create a form that allows file attachments such as .doc and .pdf files.
Add a new component:
- From the Admin toolbar, click Manage > click Content > click Edit next to the webform you want to configure.
- In the upper right, click the Webform tab > click Form Components
- Enter a label name in the New component field
- Choose the component type from the dropdown
- If the field will be required, check the required box.
- Click Add
- The next form gives you several options to configure the component. Fill in the fields as desired.
- Click Save Component at the bottom.
- Continue to add additional form components as desired.
- You can drag and drop form components to reorder.
- Use component type "Fieldset" to create a nested component group
- Use the "Clone" operation to make a copy of a component that was already configured
Email Confirmation Settings
Form submissions will be stored in the database, but the results can also be emailed upon submission. To send submissions to an email address add the address to the email field and click save.
- In the upper right of the webform you are configuring, click the Webform tab > click E-mails
- This form allows you to configure how the site admin should be notified of form submissions.
- Complete fields as desired.
- Click Save e-mail settings at the bottom.
The form settings page allows you to enter a confirmation message. You can also choose if you want the user to be redirected to a different page or URL after submission.
- In the upper right of the webform you are configuring, click the Webform tab > click Form Settings
- You can configure form settings such as limiting the number of submissions and what users can submit. Generally webforms are open to the public but you can limit access to authenticated users, if you choose.
- Complete all fields as desired.
- Click Save Configuration at the bottom.
There are 4 ways you can review form submission data:
1. via email (described in the step above)
2. From the Drupal results screen
In the upper right of the webform you are working on, click the Results tab
3. From the Drupal table view
In the upper right of the webform you are working on, click the Results tab > click Table
To download the submitted form information:
- In the upper right of the webform you are working on, click the Results tab > click Download
Choose the format to download and any export options and click Download.
If you only wish to download the data that your users have entered in the detail fields, and not the technical details about their submission session, you can uncheck the box Submission information under the Included Export Components section.
Is your form only active for a certain timeframe? You can "turn off" your form once your deadline for completion has passed.
1. Make sure that you are on the Webform tab.
2. Click the Form settings option.
3. Click the desired radio button to turn the form to an Open status or a Closed status.
You cannot change the default text of the Closed status, but you can click the Edit tab and add any text you wish to explain that the deadline has passed, the submission form will open again at a certain date, or any other details you choose.
Aways remember to click the Save configuration button at the bottom of the screen to save your changes.