drupal-form-alter
CommunityTweak Drupal forms with precise form alter hooks.
Authoredutrul
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Modifying Drupal forms can require invasive changes; this skill provides a structured pattern to apply hook_form_alter and hook_form_FORM_ID_alter to adjust fields, access controls, and submission handling in a safe, repeatable way.
Core Features & Use Cases
- Combines OOP hooks and procedural hooks for Drupal 10.3+/11 to apply form alterations.
- Common alterations include hiding fields, changing required/default values, and attaching validators or submit handlers.
- Get the Form Object from FormState to access and modify the underlying entity during the alteration process.
Quick Start
Create a MyModuleHooks class and implement formAlter to modify a specific form (e.g., node_article_form) by adding a custom validate handler and a submit handler.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: drupal-form-alter Download link: https://github.com/edutrul/drupal-ai/archive/main.zip#drupal-form-alter Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.