Use Twig to create interactive webform calculations

April 01, 2019
We recently spoke with Ryan Jones from TAPS goClub group about a fascinating project to show commuters just how much pollution they are individually contributing to the environment. In addition to the eye-opening data it provides, the webform created by Ryan and his colleague Ramon Zavala also provides a perfect example of how you can incorporate calculations into your forms and share them with your users.

Webform Block

The Webform block is a system block (View) that creates a container you can assign to a page region and then select an existing webform to display within that container.

Set up Conditional Email Recipients

If you have multiple departments in your unit, or individuals who provide specialized support, you may want to consider setting up your contact or webforms in such a way that, depending upon which options are selected or completed, the email handlers responsible for sending out the emails will send it to a very specific email account.

General Data Protection Regulation Resources

May 31, 2018
Have you received, like, a gazillion emails from sites and services you subscribe to informing you that their privacy and terms of service have been updated? What is GDPR and does it affect your site on SiteFarm?

Doing more with Webforms

August 16, 2017
Webwash, a blog dedicated to learning development "the Drupal way" has created a two part tutorial delving further into what can be done with WebForms.

"How do I get started with Webforms?"

March 09, 2017
The fellow who created the Webform module, Jacob Rockowitz, posted an hour-long introduction and tutorial in Feb 2017 providing an overview of what Webform is, what it contains, and how you can use it in your site.

Validation patterns

Advanced Webform users may want to consider ways to force certain types of validation that aren't available by default in the feature, but can be accomplished using what are called 'regular expressions' or a 'regex'.

Definition: A regular expression or regex can be described as a special text string for defining a search pattern.

How to use a regex in Webform

Scenario: a user would like to force a guest to only provide an email address with the 'ucdavis.edu' domain. This isn't possible in any of the default options but can be done using a regex pattern.

Honeypot Security

From Drupal.org:

Honeypot form protection

Honeypot form protection means that an invisible field is added to a form. If this invisible field is filled out (bots will usually put in a value), then the form will return an error. Normal users (read: human beings) won't ever see the field, so they won't fill it out. Even if they do, the field is labeled in such a way as to indicate the human shouldn't fill out the field.

Enabling the Webforms Example module

The Webforms Example module will add a collection of pre-created webforms to illustrate different aspects and usages of the Webform system. This ranges from displaying all the different types of fields you can create to sample forms for you to explore.