Webform Module
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
- 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.
The THEMING.txt file included with the module package has guidelines for theming, inclusion and order of information in submission e-mails. There are additional sections for theming the confirmation page and display of a webform.
See http://drupal.org/node/532208 on how to collect submitted information from the database with an SQL query and publish them as PHP variables on a drupal page.
For help with theming checkboxes and radio buttons, have a look at http://drupal.org/project/multicolumncheckboxesradios
