4.2.4
Star ratings, comments, and a much richer admin
This release adds a proper review/comment workflow (star rating field + a Create Comment action that writes to WordPress comments with aggregate rating meta), five new starter templates with a sandboxed preview iframe on the Add Form gallery, a column-layout container with responsive breakpoints, real-time preview sync in code mode, and a bunch of admin clarity fixes.
Star rating + comments
- New
.cf-ratingfield type — radio-based 1–5 star picker with CSS-mask icons inlined as data URIs (works whether or not the form theme is loaded). Keyboard-reachable with per-star screen-reader labels. Reverse-ordered radios + the adjacent-sibling cascade fill stars to the left of hover/check. - New Create Comment / Review action — posts the submission as a WordPress comment against a target post (numeric id,
[field]reference, or auto-detected via referer URL). When a rating field is configured, stores the value as comment metaratingand recomputes the target post’scf_rating_average+cf_rating_countpost meta — Schema-rich-snippet plugins read these keys by convention. Status flips (pending → approved) trigger a recompute viatransition_comment_status. - Code-mode toolbar gains Insert star rating + Insert columns row buttons.
Five new starter templates
| Template | Use | |—|—| | Product review | Star rating + headline + comment, paired with the Create Comment action | | Lightweight comment form | AJAX-submitted drop-in for the native WP comment form | | NPS / satisfaction survey | 0–10 scale + reason + optional email | | Bug report | Severity, browser, steps, attachment — two-column layout | | Product waitlist | Email + company + source, two-column layout |
Template preview iframe
Every non-blank template card on the Add Form gallery now has a Preview button that opens a modal iframe loading the markup via wp_ajax_cf_template_preview. Capability-gated to edit_forms, loads the same forms.css + form-theme.css a real form would use, submit-disabled so nothing fires.
Columns layout container (.cf-row)
CSS helper driven by inline CSS variables — --cf-cols, --cf-cols-t, --cf-cols-m, --cf-gap — sets desktop / tablet (≤1024px) / mobile (≤640px) column counts up to 6 each. Variable chaining means setting only the desktop count cascades to tablet and mobile. Code-mode inserter prompts for the three numbers and drops the wrapper in.
Real-time preview sync
Code-mode textarea now pushes its current markup to the preview iframe on every keystroke (180ms debounce) via postMessage. The iframe replaces #cf-preview-root innerHTML in place. Origin- and form-id-scoped so a cross-form iframe can’t be poisoned.
Form editor preview honours the global stylesheet toggles
The admin asset enqueue now conditionally loads forms.css and form-theme.css (with cf_form_theme_tokens overrides) when you’re on a form-edit screen, so the visual builder canvas and code-mode iframe both render with the same stack the front-end uses. Previously the editor preview was unstyled even with the theme on globally.
Settings clarity
- Skeleton CSS vs Default form theme — both options renamed with explicit descriptions of what they load. Skeleton (
forms.css, ~1.5 KB, structural only — labels, error states, button alignment, the new column-row helper). Theme (form-theme.css, opinionated visual layer — colors, radii, focus rings, typography). Choices are “Load / Skip”. - After Submission — clearer two-way choice (“Show success message” / “Redirect to a URL”). Contextual help appears with the selection. The redundant “Redirect to a page” option was removed; the URL field already covers that case.
- Per-form Settings tab now opens with only the first accordion (Submissions) — previously two opened simultaneously.
- “Add-ons” → “Extras” in Settings + Messages section labels.
Action merge: CreatePost + CreateArticle
The richer CreateArticle (title/content/excerpt mapping, taxonomies, ACF, featured image, author lookup) now claims the canonical create_post slug and the label “Create Post / Article / CPT”. Forms saved with the old create_article type are forwarded to the merged handler at runtime — no migration.
Bug fixes / hardening
- vendor/autoload.php require is now
file_exists()-guarded so a partial extraction during an in-place plugin upgrade can’t fatal the site. Clear admin notice surfaces on the next page load ifvendor/is genuinely missing. - Template preview
wp_die()calls now pass HTTP codes via theresponsearg instead of as the title. Unauthorized hits actually return 403/400/404. - CreateComment recompute only fires when a valid in-range rating actually landed as comment meta; out-of-range values skip the recompute.
Full Changelog: