Webform Module

Last modified: June 25, 2009 - 23:16

Webform is a module that aids in making various one-off forms such as contact forms, surveys, order forms, reservations, CRM requests, and more.

To install the module, download the module and add it to your sites/all/modules directory. Enable it under /admin/build/modules.

You will now have a new node type called "Webform". From there you simply give the webform a title, description, confirmation message, set up email settings and the like.

Finally, you can add several components (think fields). There are several component types available: fieldset, pagebreaks, grid, textarea, textfield, select (checkboxes, pulldown lists), email addresses and more.

NOTE: In order to add components, you must first “save” the Webform. Then, under the “Edit” tab, you will see a “Form components” sub-tab; this is how you build your form.

View a screencast on how to use the Webform module.

Webform vs. CCK (or Flexinode)

Webform is not meant to be a competitor or replacement for CCK. It is designed to be used where each Webform node gets its own set of custom fields. This is different from the CCK approach, where it creates content type forms that produce nodes. In fact, you can even combine CCK and Webform to add additional fields to webform nodes! Think of Webform as a solution when you want your end-users (often anonymous) to be able to submit data that you want emailed to a few email addresses or saved to a CSV file.

Webform Components

Webform components are basically the equivalent of CCK fields. You can add any number of fields to a node that an end-user can fill out. All components are included with the Webform module. These include:

  • date
  • email
  • fieldset
  • file
  • grid
  • hidden
  • markup
  • pagebreak
  • select
  • textarea
  • textfield
  • time

To read how to make checkboxes, radio buttons/groups, and menus/lists then read the Webform Field Types portion of this doc.

Advanced Options

After setting up a Webform node, you may find the need for some kind of unique processing, such as sending the request to another script or adjusting the recipients of the sent email. Webform allows this through two special PHP fields for Additional Validation and Processing.

Editing Results

tommyready - April 1, 2009 - 14:19

Is there an easy way to edit the Results data?

Like I dont want to include the IP Address and other fields.

Look at THEMING.txt

levavie - April 28, 2009 - 17:55

Look at the THEMING.txt file included with the distribution - it may help.

Generating a link to a survey

andyf - May 7, 2009 - 22:25

I am looking for functionality where I can email a link to a survey page to a list of recipients that would bring them to my drupal site where they can fill out and submit a survey. Is this possible with this module?

Webform Database handling

nallswe - May 14, 2009 - 13:56

I dont know if I'm to advanced or if this is a really noobish question but i can't find any solution to this problem anyway.

Ok here is the problem. I have created a form that works fine and is saved in the included database. How do i collect info from the database and publish them as PHP variables on my drupal page?

I understand that i have to use MySQL to reach for the database and then use _GET and stuff to get the specific info i whant. But since i havent found any documentation of how to reach out to the database, I can't start using any scripts.

Please help me with this problem.!

Same

dave_______1 - June 23, 2009 - 13:35

I'm looking for the same thing I think.
Form is great, but I want to manipulate the data eg user types 44 then submits, site times user input by 2 and print using

<?php
print ($_POST['form-number']) * 2;
?>

Tried the "Confirmation message or redirect URL:" box but can't find the query string data in post or get.

Anything?

The screencast link is broken

twbrandt - June 8, 2009 - 19:45

The screencast link is broken

not sure if there was a newer

ussher - June 10, 2009 - 07:12

not sure if there was a newer version, but there is an old version for drupal 5.x of the screen cast here:
http://geoffhankerson.com/node/53

Taxonomy

Heleen - June 20, 2009 - 22:59

I really like this module. I only need some simple forms and I find CCK a bit difficult (I'm not a web noob, but I am new to Drupal), so this module is perfect. However, I would like to add the Webform nodes to a Taxonomy term instead of just adding it to a menu. Is this possible? And if so: how? Or am I missing the point of this module?

Edit 20-jun-2009 23:58(GMT+1): I was being a total noob, sorry. I figured out that in the taxonomy settings you can specify which content types use taxonomy.

In-line Radio Buttons

gaoldiesman - July 9, 2009 - 17:51

Hi,

I am just wondering if there is a way to place all the radio buttons on one line? For example:

Question 1 - How did you like our program?
0 1 Low 0 2 0 3 Fair 0 4 0 5 Excellent

Thanks

 
 

Drupal is a registered trademark of Dries Buytaert.