Webform
Webform is a contributed Drupal module for building forms, collecting submissions and sending them on by email or to other systems, with no code.
Webform is a contributed Drupal module that lets you build forms in the browser and manage what visitors send in. You add fields, choose what happens after someone submits, and read the results in the admin. Contact forms, surveys, registrations, job applications and donation requests all fit.
How Webform works in Drupal 11
Webform is not part of core. You install it like any other module, with Composer, and enable it on the Extend page. The 6.3.x branch supports Drupal 10.3 and later and Drupal 11.
The module is split into sub-modules, and you enable the ones you need:
- Webform UI adds the admin interface for building forms. Without it, forms still work and collect data, but there is no admin interface.
- Webform Node adds a content type, so a form can be placed on a page as a node.
- Webform Templates provides starter forms such as Contact Us, Donation, Job Application, Registration and Subscribe.
- Webform Share lets other websites show your form in an iframe.
- Webform Scheduled Email Handler allows emails to be sent later.
Each form is made of elements: text fields, dates, file uploads, entity references, Likert scales and composites such as name and address. After a visitor submits, handlers run. A handler runs when a submission is created, updated or deleted. The email handler sends notifications and confirmations; the remote post handler sends selected elements to another server.
Example: a contact form on its own page
- Enable Webform and Webform UI, then open
Structure › Webforms(/admin/structure/webform). - Add a webform, or start from one of the starter templates.
- Add the elements you need and drag them into order, then add an email handler so the form sends a notification.
- Save the form. It has its own address, such as
/webform/contact, that you can link to.
To put the same form inside a page layout, place the Webform block under Structure › Block layout, or create a node that references the form.
Results and access
Submissions can be reviewed online, flagged, locked and annotated, and downloaded as CSV. For custom reports, the results can be shown with Views. Access is controlled per form: you can grant who may administer a form and who may view, update or delete submissions, by role or by individual user. Set the general permissions at /admin/people/permissions#module-webform.
Common mistakes
- Leaving the results open to too many roles. Submissions often hold personal data. Give the view-submissions permission only to the roles that need it.
- Keeping every submission forever. Webform can purge submissions automatically and limit how many a user or a form accepts. Decide the retention period when you build the form.
- No spam protection. A public form attracts bots. The Webform documentation lists spam protection among its add-ons; pick one before the form goes live.
- Assuming the email arrived. Test the handler with a real submission, and check where the notification goes if the recipient changes jobs.
For marketing and content teams
With Webform, a marketer can change a form without a developer: add a question, reorder fields, change the confirmation message or the notification address. Form data lives on your own site, so you decide who sees it and how long it stays. Ask your developers to connect the handler to the CRM you use, so leads do not wait in an inbox. Starter templates are a faster start than a blank form.
With DXPR
DXPR Builder places a webform through the Webform block, the same way it places other Drupal blocks. You drop the form into a column next to your copy and keep the layout editable. See DXPR Builder.