August 25, 2020
What Can You Do With Webforms?
Agency content editors have long wanted more capabilities when collecting information from their visitors. They have often sought third-party tools to gather facts and figures.
With the migration to GovHub, a web publishing platform powered by Drupal 8 (D8), Digital Services Georgia (DSGa) has made improvements to webforms to solve a variety of problems that were not available in Drupal 7 (D7). This post will highlight some of the advancements and how they can benefit both your website and its visitors.
More Advanced Form Fields
There are dozens more form fields to choose from, many of which will make building your webform much easier, faster, and more modern. We’ve provided notes on some of the more exciting fields below. If you want to learn more, sign up for one of our Training classes.
Composite Elements
Speed up your webform development with multiple fields to collect common information in a single click. Quickly add multiple fields for collecting things like an address, a person’s full name including their title and suffix, or multiple types of phone numbers like cell or fax.
Entity Reference Elements
Say, for instance, you’d like for your visitors to reference a piece of content on your site while completing a form. Maybe you’d like them to select the Contact information for an individual within your organization or Service that your agency provides. You can achieve this with Entity Reference Elements.
An entity is a piece of content on your site. You can choose which content types you’d like to reference in the form of an auto-complete field, check boxes for multiple references, or radio buttons for selecting a single reference.
This feature pulls in content from elsewhere on your site and avoids duplication of work and the possibility of introducing errors.
Advanced Elements
There are several Advanced Elements in D8. Here are a few that can help webforms meet your business needs.
- The Autocomplete Element allows you to add a text field and populate values that visitors can access as they start to type in the field. This is good if you want all the responses in a text field to be in the same format or accept the same set of terms, while also giving visitors options to pick and choose.
- The Terms of Service Element lets users accept any terms related to the use of the webform or your site with a checkbox and a separate link for those terms.
- Want to collect signatures? There's an element for that! The Signature Element collects electronic signatures from constituents.
Conditional Logic
D8 allows site managers to set rules that change what users see on a form depending on what information they entered in previous text fields.
Conditional Email Messages
In D8, you can send custom email responses to users based on what's been entered. For example, you can send a custom message only to people with a government email address. In the past, content managers have had to rely on third-party tools for this functionality.
Form Results Access
Limiting who can see the results of your webforms has gotten more granular in D8. Previously, you could only limit who had access to the webform results page. Now, you can limit access to the results of individual fields as well.
We hope you’re as excited about these advancements and updates to your website as we are. This is only a small portion of the new features available. If you are interested in learning more, submit a Support ticket and find out about what you can do on GovHub.
Best Practices for Creating Webforms
- Consider the Mobile Experience
- For example, when accepting information like a phone number, consider using the Telephone field rather than a plain Text Field. Both will accept a phone number, but the Telephone field will provide your visitors with the number keypad while on mobile rather than the full keyboard. Small considerations like this make for a better mobile experience.
- Break Up Long Webforms Into a Multi-Page Webform
- Long webforms may discourage visitors from starting or completing it. Allowing a long form to be broken into smaller, more digestible chunks makes for a better user experience.
- Provide Help Text and Descriptions When Requesting Uncommon Information
- Cognitive abilities vary across your site’s visitors. Don’t assume that all of your visitors will know agency-specific information you’re collecting. The more help you provide lowers the chances of receiving inaccurate or incomplete information.