Drupal Forms

Decide between Webform and core Contact for Drupal 10+ projects.

34|12|Updated Mar 10, 2019
One-click install
npx skills add https://github.com/theodorosploumis/drupal-best-practices --skill drupal-forms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Drupal Forms
Source: https://github.com/theodorosploumis/drupal-best-practices/tree/main/ai/skills/forms
Command: npx skills add https://github.com/theodorosploumis/drupal-best-practices --skill drupal-forms

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides you in selecting the most appropriate form-building tool in Drupal, preventing the common pitfall of using an overly complex solution for simple needs or an inadequate one for advanced requirements. This saves development time and ensures maintainable forms.

Core Features & Use Cases

  • Tool Selection Guidance: Get clear recommendations on when to use the powerful Webform module versus Drupal's simpler core Contact form.
  • Exportable Configuration: Ensure your form configurations are exportable and manageable in code, supporting robust deployment workflows.
  • Access & Handler Recommendations: Receive advice on setting up proper access controls, submission handlers, and spam mitigation for your forms.
  • Use Case: If you need a complex multi-step application form with conditional logic and custom email handlers, this Skill will confirm Webform is the correct choice and help outline its configuration.

Quick Start

Recommend whether to use Webform or core Contact for a newsletter signup; include reasons, access settings, and exportable configuration notes.

Frequently Asked Questions about Drupal Forms

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Should I use Webform or Drupal's core Contact form for my site?

Choose core Contact for simple single forms like basic contact pages; use Webform for complex requirements including multi-step forms, conditional logic, custom handlers, and advanced spam protection. Webform is the default recommendation for most projects needing flexibility.

How do I decide between Webform and core Contact for a newsletter signup?

Evaluate complexity: core Contact suits basic email capture with minimal fields. Webform handles conditional display, custom validation, submission storage, and integration with email marketing systems. Document your access controls and handler configuration to support exportable, maintainable code.

Can I export Drupal form configurations to code?

Yes. Both Webform and core Contact support exportable configuration in code, enabling version control and consistent deployment. Webform provides richer export options for complex handlers, access rules, and conditional logic across Drupal 10+ projects.

What spam protection options are available for Drupal forms?

Core Contact offers basic email validation. Webform supports confirmations, CAPTCHA integration, and custom submission handlers for advanced spam mitigation. Configure handlers and access rules aligned with your security requirements.

Do I need Webform for a multi-step application form with conditional fields?

Yes. Core Contact lacks multi-step logic and conditional field display. Webform is the correct choice for application forms requiring branching, step progression, and dynamic field visibility based on user input.