-
released this
2026-05-22 02:20:38 +02:00 | 92 commits to main since this releaseFoundation work for the upcoming Newsletter module: the Contact Form's form-builder (drag-and-drop editor, structure normalisation, field renderers, anti-spam wiring) has been extracted from
src/Modules/ContactForm/into a new sharedsrc/Forms/namespace. Newsletter (landing in v0.3.0) will mount the same editor with its own field types and CPT — zero JS duplication.Plus the small WP 7.0 cosmetic fix that was sitting on
mainbetween v0.2.0 and now.Form-builder refactor
- New
LRob\EmailToolkit\Forms\namespace undersrc/Forms/:FormStructure,FormContext,FormEditorRenderer,FieldRenderHelpers,FieldTypeInterface,FieldTypeRegistry, plus the 10 stock field types (Text, Email, Textarea, Number, Phone, Date, Select, Radio, Checkbox, Submit) underFields/. FieldTypeRegistryis keyed by CPT slug — each consumer module declares its allowed types for its own form CPT. Contact Form keeps all 11 of its types (including its module-specific captcha); Newsletter will register a smaller set plus its own picker types.Plugin::boot()wires the registry into the container before module boot, so modules can register types immediately.FormContextis host-neutral:start($form_id, $instance, $name_prefix, $id_prefix, $editor)accepts module-specific prefixes. Contact Form passeslrob_etk_cf/lrob-etk-cf; Newsletter will passlrob_etk_nl/lrob-etk-nl.- Contact Form's captcha field is now
src/Modules/ContactForm/Fields/CaptchaField.php— captcha routing stays tied to its module's meta key + Captcha-module context.
Asset rename + CSS namespace flip
- Editor JS renamed
admin/js/contact-form-fields-editor.js→admin/js/form-fields-editor.js(handle:lrob-etk-form-fields-editor). - Form-builder DOM classes renamed
lrob-etk-cf-*→lrob-etk-form-*(form wrapper, row/col/field, label/helper/error, overlay/insert/edit-shell, options, submit, required toggles, inline-settings strip, type picker, preset modifier — about 35 classes across CSS/JS/PHP). - Module-specific admin chrome keeps its own prefix: Contact Form's form cards, recipients picker, modals, submissions panel etc. stay
lrob-etk-cf-*; Newsletter's admin chrome will belrob-etk-nl-*. Per-module captcha field types keep their own CSS namespace too (lrob-etk-cf-captcha-*for Contact Form).
Other
- WP 7.0 button line-height (the 0.2.1 fix bundled into this release): override the new core rule
.button .dashicons { line-height: 1.9 }so toolkit buttons with leading icons keep their vertical centering.
Design spec
newsletter.mdat the repo root documents the full Newsletter module design — data model, send pipeline, tracking, import/export, system email templates as a CPT, scale targets, implementation slicing. Referenced fromCLAUDE.md. Worth reading if you want a preview of what v0.3.0 will land.No behavior change
Existing Contact Forms continue to work unchanged. No DB migration. CSS rename is a like-for-like flip with no functional impact. Form-builder editor, frontend rendering, submissions, anti-spam, captcha — all behaviorally identical.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- New