Webform

I am experimenting with the Drupal Webform module to produce forms. The main alternative is CCK. Why choose Webform? How successful is it? I will answer your questions based on my experience.

Why choose Webform?

  • Webform is focused on the task.
  • You do not need any other non core modules.
  • The Drupal 6 version is in active development.
  • There is a Drupal 7 version on the way.

 

Part of CCK will be in Drupal 7 and part of the CCK group of modules does handle forms but CCK is a steep learning curve and adds a lot of overhead not needed for my requirements. I try to avoid non core prerequisite modules for Drupal 6.

Drupal 7 includes a Field module in core that uses a tuned version of code based on part of CCK and focused modules, including Webform, can choose to use Field. There are the Conditional Fields and Multistep modules to add basic form requirements missing from CCK forms.

Webform creates a single content type and CCK can create multiple content types. I do not need multiple content types for forms. CCK can create new field types and I do not need a field type outside those supplied in Webform. Overall Webform appears to do exactly what I want and I do not have to learn a lot of stuff I will not use just to build a form.

Installation

Download Webform from drupal.org/project/webform. I used 6.x-3.0-beta2 from 2010-Mar-01, a 327.7 KB download. Expand the .gz file to a .tar file using 7-zip or equivalent. Expand the .tar file to a directory using 7-zip or equivalent. Upload the Web form directory to /sites/all/modules/.

Select Administer » Site building » Modules, switch on Webform, and save the configuration.

Configuration

Select Administer » By module » Webform. Webform offers the following options.

  • Configure permissions
  • Webform settings
  • Webforms
  • Get help

There is also documentation at drupal.org/handbook/modules/webform.

Webform permissions

Webform lets you set the following permissions. I use the default administration login that has all permissions and give all permissions to an Editor role as editors will create forms.

  • access all webform results
  • access own webform results
  • access own webform submissions
  • delete all webform submissions
  • delete own webform submissions
  • edit all webform submissions
  • edit own webform submissions

Webform settings

Webform-enabled content types:
[ ] Page
[ ] Story
[*] Webform
Webform allows you to enable the webform components for any content type. Choose the types on which you would like to associate webform components.

There is a list of field types all switched on by default.

  • Date Presents month, day, and year fields.
  • E-mail A special textfield that accepts e-mail addresses.
  • Fieldset Fieldsets allow you to organize multiple fields into groups.
  • File Allow users to upload files of configurable types.
  • Grid Allows creation of grid questions, denoted by radio buttons.
  • Hidden A field which is not visible to the user, but is recorded with the submission.
  • Markup Displays text as HTML in the form; does not render a field.
  • Page break Organize forms into multiple pages.
  • Select options Allows creation of checkboxes, radio buttons, or select menus.
  • Textarea A large text area that allows for multiple lines of input.
  • Textfield Basic textfield type.
  • Time Presents the user with hour and minute fields. Optional am/pm fields.

There is a bunch of other settings covering the format of the submission email and the format of the results download.

Existing forms

Select Administer » Content management » Webforms to see existing forms.

Create a form

Select Create content » Webforms to create a form. A form looks exactly like a page node or story node until you save the Webform node. After you save the form, you will see three new tabs.

  • Webform
  • Results
  • Track

Webform

There is no checkbox creation option. I cannot create the first element of my first form.

Results

Results lists submissions, provides an analysis of responses to questions, lists a table of submissions by user and IP address, an option to download the results, and an option to clear existing results. You might periodically download results and clear the results table especially if you change the form subject. Suppose you set up a survey for the most popular movie this month. At the start if each month you might download the results, clear the results table, and change the month name in the form.

Track

Track lists accesses for the form. The information is from the Drupal core access log if you want some other sort of summary.

Alternatives

The Conditional Fields module drupal.org/project/conditional_fields, adds to CCK forms the important ability to make the appearance of a form section dependent on a previous field. The Multistep module, drupal.org/project/multistep, adds multiple steps to CCK based forms and possibly is enough to make CCK based forms suitable for typical forms use. I will test CCK forms + Conditional Fields + Multistep as a replacement for the incomplete Webform.

The Form module, drupal.org/project/form, does nothing by itself and is only a support module for other forms related modules plus it has serious problems in Drupal 6.

Multiforms, drupal.org/project/multiforms looks good because my first test form is a multipage form but Multiforms does not have a finished Drupal 6 version or any signs of a Drupal 7 version.

Conclusion

Webform is not suitable for form creation until it gets a checkbox element type. A seriously technical person could waste time trying to bend a checkbox out of Webform using the complicated workaround provided across the documentation and lots of issues recorded against Webform but you could not hand form creation to a regular content contributor.

Comments

Hi

I've been very impressed by webform and am compelled to disagree strongly with your conclusion. I presented a bog standard, dyed in the wool, non-technical user with a Drupal training program which included setting up feedback forms using webform, and was very impressed by the results.

As a testament to Drupal and its contributed modules in general (and webform in particular as pertinent to this post) she had a multi-page site up and running within a few hours. The only stumbling around she had in using webform went around things such as field naming standards - but there were no issues with any of the webform components.

A single checkbox is readily obtainable by creating a new select component, define only one option and tick Multiple (leaving Listbox unticked).

Quicksketch and company have done a marvelous job with this module.

Give it another go and have a lot of fun!