4.2.6
Patch: preview button on the per-form template chooser
The Preview button that landed on the Add Form gallery in 4.2.4 now also appears on the template picker that opens inside the per-form Fields tab (the React visual builder).
- Each non-blank card carries a “Preview” pill in its top-right corner. Hovering or focusing the card reveals it; clicking it opens the same iframe modal the Add Form gallery uses.
event.stopPropagationstops it from also firing the parent “select template” click. - The preview modal moved from inline page markup into
Admin::render_template_preview_modal, hooked onadmin_footerfor every Core Forms admin screen. Click handling is delegated — any element withdata-cf-preview="{slug}"(anywhere on a Core Forms page) fires it.window.CoreFormsAdmin.openTemplatePreview(id, label)is exposed for programmatic triggers. - Localized
cfFormTemplatesentries now carry apreview_urlso the React builder (or any other JS) doesn’t have to re-derive the admin-ajax URL.
Full Changelog: