Last updated March 16, 2015. Created on December 3, 2007.
Edited by DanChadwick, heyyo, kyleheney, quicksketch. Log in to edit this page.

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.

The checkboxes under the "E-mail" header should be checked for each field you want to be included in the email that is sent when the form is submitted. This checkbox does not have to do with validating that field as an email address; that is handled by choosing "email" in the "Type" column.

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. Remark: depending on your CSS files, some of these sub-tabs may be invisible, although your cursor would show the link when passing over them.

Screencasts

  • Screencast by Adam Jensen from UNT
  • Un excelente (y largo) screencast en Español
  • Webform vs. CCK (or D7 Field module)

    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 typically is used when performing data collection that is a one-way communication, that is, many users submitting values to a very small set of administrators. Webform is not a front end for letting users create custom nodes. Webform submissions are not nodes. This means that you can't setup custom access permissions to submissions or do just about anything with them outside of what Webform provides for you without using additional modules. For example in D7, using the Data module and the Webform MySQL Views module, you can use Views to display webform submissions (see d.o. post Display Webform submission data in Views and a screencast: Display Webform submission data in Views).

    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.

    Additional webform component
    Matrix/Table Component

    Theming

    The THEMING.txt file included with the module package has guidelines for theming with instructions on how to customize submitted e-mails, confirmation pages, and the display of the form itself.

    Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

    Comments

    quicksketch’s picture

    Please do not post questions about Webform, requests for support, or report bugs here. Go to the Webform issue queue and (after searching) post there for support.

    HashKey’s picture

    Hello,
    Is it possible to copy a field in another field ?
    For example I have a field with a text, I would like to copy-paste this text in another field, but automatically, or with a "button" ?
    I don't know what and how to do.
    Regards,
    HashKey

    upendra1991’s picture

    I have a select box with items A,B,C,D
    I want to hide the text field with name "comments" when I select either A or B options(this means text field should be visible when I select either C or D).

    Module says only most recently executed condition will be effective.

    HashKey’s picture

    Hello,
    did you fix it ? You can do what you want by adding one condition for one action.
    Example : If "A" selected hide "comments" -> This is the first condition
    if "B" selected, hide comments -> this is your second condition.
    Regards,
    HashKey

    upendra1991’s picture

    The above mentioned was the same that I used and it was not working.

    I forgot the fact that I can use AND/OR and add multiple conditions for a single action. This worked for me.

    cyberzeus’s picture

    Hello,

    Does anyone know:

    1) How to get CAPTCHA working with these forms? Mainly, what element ID to use in the CAPTCHA config?
    2) If it is possible to have multiple fields on a given line in a given form?

    Thanks in advance for any help you can lend.

    cyberzeus’s picture

    I found the answer to #1 and while a bit cumbersome, the ID is discernible when either reviewing the source of the form, debugging the page, etc. If anyone knows of a easier method, please feel free to post here.