Webforms

The Webforms feature allows you to collect information from anonymous site visitors. Uses for this feature include surveys, multi-page questionnaires, polls, event registration forms, and lead generation pages.

Forms features a basic analysis of the results collected. If this is insufficient, you can download the data off your site for further analysis and use in any spreadsheet.

For more information on using the results of your webforms, see Forms results.

Enabling this feature

To enable this feature as you create your Drupal Gardens website, drag the slider for Webforms to On on the Choose a template page.

Webforms feature

If you enable the feature from the Choose a template page, you can create Webforms using the Add content link from the shortcut bar.

Creating webforms

To create a new webform:

  1. In the shortcut bar, select Add content, and then click the Webform link.

    Create Webform page

  2. Enter a Title for the webform, such as Survey.
  3. Construct the webform by either dragging fields from the Fields list on the left into the editing area on the right, or by clicking on the fields in the left column to have them appear in the editing area.

    Adding fields to the webform

    Adding the first field into the editing area automatically adds a Submit button to the webform.

    You can rearrange the fields at any time during the webform creation process.

  4. In the editing area, click on each field to view the fields' editable attributes on the left. For more information about the different fields and their attributes, see the Customizing fields section of this page.

    Editing field settings

  5. Use the vertical tabs at the bottom of the page to set additional attributes for your webform, including menu links, a custom URL, and other special settings. For more information, see the Customizing the webform section of this page.
  6. Click Publish.

Drupal Gardens creates the webform based on your settings. To view the created webform, in the admin menu, select Find content.

edit tab.

Customizing fields

Each field that you select for your webform has additional attributes that you can modify in order to ensure that you're collecting the required information from the person filling out the form.

When you select a displayed field in the webform in order to edit it, the field's attributes appear on the left of the page in the Field settings tab. For each field, the Field settings tab contains an accordion view of that field's Properties, Display, and Validation attributes.

Text field

A single-line text entry field.

Multi-line text field

A multi-line text entry field.

Radio buttons

Obtains a single choice from a list of items.

Check boxes

Obtains one or more choices from a list of items.

Drop-down list

Obtains a single choice from a list of items.

E-mail

Only accepts valid e-mail addresses as input.

File upload

Allow visitors to include files as part of their submission. You can use this for users to include photographs, music, documentation, resumes and more.

Page break

Insert one or more page breaks to create a multi-page form. This can help you keep question pages short and simple.

Formatted content

Enter explanatory texts, instructions, images and so on. To format and organize the text, select a text format and use the HTML formatting it supports.

Fieldset

Organize fields into groups on the page. Simply drag a fieldset into place, then drag one or more fields into it.

Hidden field

This field and its contents are not visible to your site visitors. You can use it to label results from different forms, different versions of the same form, add reminders to site admins about processing deadlines or anything else you need. Setting a default value will return it with the rest of the results submitted by your site visitors, such as a survey version number.

Customizing the webform

The panels at the bottom of the webform page include several customization options for the webform.

The Form settings panel provides customization options specific to webforms, including how they handle user data submissions, access, and other advanced settings.

Form settings panel

For information about the other available panels on the page, see Common content settings.

Submission settings

  • Customize confirmation checkbox - Configure your website's actions when a user submits a response to this webform.

    Select from the following form submit options in the drop-down menu:

    • Show standard confirmation page - Displays a confirmation page that contains the information you enter in the Page body field.
    • Redirect to a different page - Redirects users to the page in the Path field. You can also display a confirmation message by selecting the Show a confirmation message checkbox, and then entering information in the Page body field.
    • Stay on the same page - Users stay on the webform page. You can also display a confirmation message by selecting the Show a confirmation message checkbox, and then entering information in the Page body field.
  • Enable spam protection (Mollom) checkbox - Use Mollom to protect webform comments from spam.

    For more information about Mollom, see Mollom. This checkbox is enabled by default.

  • Limit submissions checkbox - Limit how often visitors can submit the webform to protect against spam.

    When you select this checkbox, additional settings appear which allow you to set a visitor's number of allowed submissions for a period of time.

  • Send a confirmation e-mail checkbox - Send the results for each submitted webform to an e-mail address.

    When you select this checkbox, additional fields appear for the email message:

    • To - The email address to which Drupal Gardens sends confirmation emails. This field only supports a single email address. To send confirmation emails to multiple recipients, create an alias email with all of the required recipients.
    • Subject - The subject of the confirmation email.
    • Body - The formatted text of the confirmation email. You can also add tokens to the email to send visitor information and webform results. For more information, see the Using tokens with confirmation emails section of this page.

Submission access

Use this section to set which user roles can access and submit your form. For more information about user roles, see User roles and permissions.

Submission access section

Advanced settings

  • Create a block - Your forms can appear in blocks as well as on their own pages. Select this option, save your form, then go to the Blocks page to enable and configure its block. For more information, see Blocks .
  • Show complete form in teaser - If your form is displayed on your front page or blog page as a teaser, depending on your settings, it might be cut off after a certain number of lines or characters. Select this option to prevent this from happening.
  • Display a link to previous submissions - This option displays a link to the previous submission by visitors who have already submitted your form.

Using tokens with confirmation emails

Tokens allow you to configure your confirmation emails for webform submissions to include information including the user's IP address, the date/time of submission, the user's email, and more. Your confirmation emails can even include values from the completed form.

To add tokens to a confirmation email, in the Body field, enter tokens from the Token values section. For example, if you want the confirmation email to include all of the visitor's webform results, include the %email_values in the Body field.

Token use in confirmation email

Note: Several tokens include a key, which allows you to obtain token information from a field on a webform. Each field on a webform has a Machine name, which is displayed under the Label field in Field settings > Properties.

Machine name

For example, if you want to display the formatted field label and value for a specific webform field, use the %email[key] token, and replace key with the field's machine name (example, %email[new_1334599733011]).