Webform components can be used to collect different types of data. There are many useful components available, as shown in the screenshots below.
The Settings tab contains some useful advanced options.
Displays a custom message to the user, such as “Thank you for filling out our feedback form. Someone will be in contact with you within the next 48 hours.”
You may redirect users to another page using this advanced setting. For example, you could create a "Thank you" page that’s used for all your form submissions.
Tip: Be careful creating a "Thank you" page as it may appear on other pages, such as search results.
You can control how often a form can be submitted using the two "submission limit" fields.
Tip: Submission limits can be tricky. For example, if you’re collecting anonymous information the system has limited ways of knowing if a site visitor has already submitted the form and it’s also possible to trick the webform into accepting multiple submissions.
And many more...
The GovCMS Webform provides great flexibility. Have a look through the other options to familiarise yourself with the form.
You can view the webform results from the Webform page (if your account has the correct permissions) by clicking on the Results tab. Results can be viewed and downloaded in many different formats.
In this exercise we’re going to create an event registration form.
Add a new Webform (see previous Exercise 11.1 how to create a webform) and set its title as Event Registration.
Add a component field type Entity select (see the Entity reference elements section), titled "Event" (make it required - see the Form Validation fieldset at the bottom). Configure the rest of the options to match these screenshots:
Add a Text field element labelled “Full name”, make it required. You may add the description “Please enter your full name” in the Element description/help/more fieldset.
Add an Email element, labelled “Email address” and make it required.
Add a Textarea element labelled “Comment” and make it optional.
Add some “Basic HTML” markup that says: "You are about to submit a form on the internet, are you sure?"
Split your form into two-page form by adding two pages. Name them “Step 1. Form” and “Step 2. Confirmation”
Using the little cross drag-and-drop to position Pages 1 and 2 as displayed. Then, indent form elements to the right, nesting them within pages 1 and 2, as below:
Press the Save elements button and test your form
Hint: The Test tab allows you to easily test your form with auto-filled dummy data.