What problem does it solve?
This Skill solves the problem of building stateless HTML Forms (via the HTML Forms WordPress plugin) inside a Roots Sage/Acorn project while keeping frontend validation reliable and consistent.
Core Features & Use Cases
- Drop-in Sage integration for HTML Forms: Render
html-form CPT posts through a Blade routing layer provided by log1x/sage-html-forms, selected by an ACF addPostObject field.
- Design-system-first Blade views: Render form markup using shared
x-form.* primitives (like x-form.field, x-form.input, x-form.textarea) so styling and accessibility come from your component library.
- Progressive client-side validation: Use a per-project ES module (
initHfValidation) layered on top of the HTML Forms submission pipeline, driven by HTML Constraint Validation plus custom validators and plugin DOM events (hf-success, hf-error, hf-submitted).
- Trap-aware correctness: Avoid three production-breaking validation pitfalls (Blade attribute escaping for
pattern, Chrome behavior for type="tel", and ValidityState being non-enumerable).
Quick Start
Ask your AI assistant to scaffold the exact Blade form view for a new html-form CPT slug using the provided x-html-forms wrapper and x-form.* components, and to wire the block JS to initHfValidation with correct per-field messages and validators.