Webforms

Webforms afrank30 Wed, 10/01/2014 - 09:50
Drupal Version
Tags

This section provides tips and tricks for using the Webform module to create forms on a Drupal website, from an Editor's perspective.

Please note that due to European Union General Data Protection Regulation rules, when collecting personal information it is best to host your form on the campus licensed Qualtrics service, which has been approved for collecting personal data.  If you collect personal data on your unit's website, you and your unit are responsible for making sure that you follow all of Georgia Tech's data policy rules and regulations.

If you are not collecting any personally identifiable information that isn't covered by any other privacy or secrecy policy, then you are free to host such a form wherever you like.  That said, we'd still strongly recommend not using third-party services that aren't under a Georgia Tech contract.  See the Resources for Webmasters page on "outside web hosting solutions" for an explanation of the issues with outside services.


Webform Topics

Custom Emails for Webform 7.x-3.x

Custom Emails for Webform 7.x-3.x afrank30 Thu, 05/11/2017 - 13:42
Drupal Version
Tags

The following instructions show how to make it easier to read Webform data sent in emails (for Webform 7.x-3.x).

Under the Emails tab for a Webform, find the section titled Email template.

Default template

If you choose "Default template" from the drop down box, you usually have this code:

Submitted on %date
Submitted by user: %username
Submitted values are:
%email_values

The results of this submission may be viewed at:
%submission_url

Custom template

However, if you choose "Custom template" from the drop down box, you can customize how your webform data is output in the email(s) that are sent. For example, unless people are creating accounts on your site, you may want to remove the %username line.

Key values

Of more frequent use, though, is the need to simplify submitted data and shorten the labels. To include and format a specific piece of data in this email, use %value[key], where key is the machine name of the field holding that data.

Keys can be found under the Form components tab for a webform. For each field you want to include in the email, select Edit"for that field's row, and copy the Field Key.

Example template

An example custom email template, where you let webform create the names of your field Keys, based on the Label you gave each field, might look like this:

Submitted on %date

DETAILS:

Contact Person:
%value[contact_person]
%value[email]
Work: %value[work_phone]
Cell: %value[cell_phone_if_applicable]

Event Details:
Name: %value[event_name]
Date: %value[event_date] from %value[event_start_time] to %value[event_end_time]
Location: %value[event_location_please_include_rain_location_if_applicable]

The results of this submission may be viewed at:

%submission_url