HXFE — Code-First Forms

Changelog

1.4.6

  • Security: Webhook requests now use reject_unsafe_urls to block requests to internal IPs and unsafe ports (SSRF hardening, found in monthly AI-driven security review)

1.4.5

  • Added: hxfe_after_submit action hook — fires after successful form submission with $form_id, $values, $schema. Enables third-party plugins (e.g. HXMD) to capture submissions

1.4.4

  • Added: Cloudflare Turnstile field type (type: ‘turnstile’) — privacy-friendly spam protection as an alternative to reCAPTCHA
  • Added: Turnstile managed mode (auto-verification widget) and invisible mode (no UI, token obtained on submit)
  • Added: Turnstile site key / secret key settings under Settings → HXFE
  • Added: Server-side verification against Cloudflare’s siteverify API with fail-closed behavior in production

1.4.3

  • Fixed: Resolved double URL-encoding of the SMTP test result message (removed redundant urlencode/urldecode)
  • Fixed: Sanitize $_GET[‘test_msg’] before use in the settings page
  • Fixed: Shortened Short Description to under 150 characters

1.4.2

  • Added: SECURITY.md — security policy, vulnerability reporting, and disclosure timeline
  • Added: MAINTENANCE.md — architecture overview, htmx update steps, and fork guide
  • Docs: Updated ai-reference.md — added design philosophy and maintainability section for AI agents

1.4.1

  • Updated: htmx 1.9.12 → 2.0.10
  • Changed: htmx script handle renamed to ‘hx-htmx’ (HX series shared handle)
  • Improved: Added wp_script_is() check to prevent duplicate htmx loading

1.4.0

  • Added: Error logging system — SMTP, Webhook, and reCAPTCHA errors are now logged to wp-content/hxfe-logs/
  • Added: Settings → Form Engine — Logs page to view and clear error logs from the admin
  • Added: Logs are color-coded by error type (SMTP / Webhook / reCAPTCHA / File)
  • Added: Automatic log cleanup after 30 days
  • Added: .htaccess protection on the log directory to prevent web access
  • Changed: Error logging now always active (previously required WP_DEBUG)

1.3.9

  • Fixed: Renamed htmx script handle from ‘htmx’ to ‘hxfe-htmx’ to avoid conflicts with other plugins loading htmx
  • Fixed: Duplicate shortcode on same page now renders a safe HTML comment instead of broken duplicate IDs
  • Docs: Added schema linter warning reference to ai-reference.md and HXFE-manual.md

1.3.8

  • Security: IP access control (allowed_ips) now uses REMOTE_ADDR only by default, ignoring forgeable proxy headers (X-Forwarded-For, etc.). Sites behind a trusted reverse proxy (e.g. Cloudflare) can opt in with define( ‘HXFE_TRUST_PROXY’, true ); in wp-config.php, or scope it precisely via the hxfe_trusted_proxy_headers filter. Action required only if you use allowed_ips behind a proxy.
  • Security: reCAPTCHA validation now fails closed in production when the secret key is missing (previously requests passed through unverified). Development environments with WP_DEBUG still skip validation for convenience.
  • Security: Form password comparison for plain-text passwords now uses hash_equals() to avoid timing side channels.
  • Security: CORS wildcard origin (*) no longer sends Access-Control-Allow-Credentials, avoiding the unsafe wildcard+credentials combination. Named origins are unaffected.
  • Dev: Schema lint now warns when a recaptcha field has no secret key configured.

1.3.7

  • Security: Removed skip_sanitize parameter from hxfe_process_fields() — all values are now sanitized on every call, including confirm→submit flow
  • Security: Clarified that sanitize_text_field() and related functions are idempotent, so re-sanitizing already-sanitized values is safe

1.3.6

  • Security: Added nonce verification to hxfe_handle_back() to prevent unauthorized form re-rendering
  • Security: Back button now passes hxfe_nonce (hxfe_validate_{form_id}) via hx-vals
  • Code: Clarified skip_sanitize=true comment in hxfe_handle_submit() to explain double-sanitize prevention

1.3.5

  • Renamed schema key: redirect_rules → complete_redirect_rules (consistent with other complete_* keys)
  • Renamed schema keys: before_open_html / after_close_html → before_html / after_html
  • Renamed field keys: min_check / max_check → min / max (consistent with min_date / max_date)
  • Deprecated field key hide_if — use show_if instead (backward compatible, will be removed in a future version)

1.3.4

  • Added: Page slug auto-injected into subject as [form-id@slug] for per-page tracking
  • Added: Schema examples panel in admin UI with 7 copy-paste samples
  • Added: Responsive breakpoint at 768px
  • Added: CSS custom properties (design tokens) for easy theme customization
  • Added: download_url / download_label schema keys — download button on complete screen
  • Added: available_from / available_until schema keys — form availability window
  • Added: before_html / after_html schema keys — custom messages outside window
  • Added: allowed_origins schema key — per-form iframe CORS restriction
  • Added: Embed HTML <iframe> copy button in admin form list
  • Improved: Admin UI redesigned — stat cards, clean table, monospace field type chips
  • Improved: chatbot send button replaced with paper-plane SVG icon
  • Improved: Login/auth screen with border, padding, full-width button
  • Improved: iframe / CORS Settings tab removed — now schema-level only
  • Fixed: hx-encoding=”multipart/form-data” auto-applied when file field present
  • Fixed: File name shown correctly on confirm screen
  • Fixed: File attachment preserved through confirm → submit flow
  • Fixed: Temporary file cleanup cron (hourly, 1h expiry)
  • Fixed: Fade-in flash bug (remove+reflow caused visible flicker)
  • Added: complete_html_rules schema key — conditional complete screen HTML (supports {field_key} interpolation)
  • Added: Diagnosis/calculator mode — omit to with complete_html_rules for no-email chatbot
  • Added: chatbot + show_if / required_if conditional fields now fully supported
  • Improved: chatbot UI redesigned with LINE/Slack-style header, timestamps, and bubble shadows
  • Added: pattern / minlength / maxlength / error_message schema keys for field-level validation
  • Added: hxfe_validate_field filter for per-field custom validation
  • Added: hxfe_validate_form filter for cross-field validation (password confirm, at-least-one, etc.)
  • Added: before_html / after_html schema keys for injecting HTML around fields
  • Added: disable_context schema key to opt out of page slug auto-injection

1.3.3

  • Renamed: SHFE → HXFE across all PHP/JS/CSS (class names, IDs, function prefixes)
  • Fixed: Scroll after htmx outerHTML swap (re-fetch element by ID after swap)
  • Fixed: Step form Back button returning 403 (nonce was missing from hx-vals)
  • Fixed: chatbot phpcs:ignore comment appearing as visible text in UI
  • Fixed: Copy button fallback for HTTP environments (execCommand)
  • Changed: Shortcode copy buttons labeled “Form” / “iFrame” for clarity

1.3.2

  • Added: IP restriction — whitelist IPs and CIDR ranges per form (allowed_ips)
  • Added: Customizable IP blocked message (ip_blocked_html)
  • Added: Form-level password authentication (auth.users)
  • Added: Brute-force protection — lockout after 5 failed attempts (15 min)
  • Added: Auth session via secure httponly samesite=strict cookie
  • Added: Login form labels fully customizable per form
  • Added: Support for wp-config.php constants as password source (keeps secrets out of Git)

1.3.1

  • Security: file field now uses HXFE’s own safe MIME whitelist by default instead of WordPress defaults
  • Security: added .htaccess to hxfe-uploads/ directory to prevent PHP execution
  • Added: file field type now works — uploaded files are attached to admin notification emails
  • Added: includes/file-upload.php with wp_handle_upload() based processing
  • Added: mime_types schema key to whitelist allowed MIME types server-side
  • Added: temporary files are automatically deleted after email is sent
  • Removed: lint warning about file field being unimplemented

1.3.0

  • Refactored: extracted field renderer functions to includes/fields/field-renderers.php
  • Refactored: added hxfe_validate_step_request() to DRY up step endpoint gate logic
  • Refactored: improved PhpDoc type definitions on core functions (hxfe_process_fields, hxfe_eval_condition, hxfe_interpolate)

1.2.2

  • Fixed: confirm_label now correctly applies to the input form submit button
  • Fixed: hxfe-front.js (scroll, focus, loading state) was not enqueued
  • Fixed: disable_default_css and custom_css now work correctly
  • Fixed: chatbot.js is now only loaded on pages with chatbot forms
  • Fixed: uninstall.php now removes all plugin settings from the database
  • Added: error_message schema key to customize the validation error summary text
  • Added: confirm_label schema key (separate from submit_label for clarity)
  • Note: file field type renders HTML but file saving is not yet implemented

1.2.1

  • Added tel and url field types with built-in validation
  • Added Webhook support (Zapier, Make, Slack, custom HTTP endpoints)
  • Added label customization: submit_label, back_label, next_label, confirm_heading
  • Fixed confirmation screen: radio/select now shows label instead of value
  • Fixed confirmation screen: checkbox_group shows comma-separated labels
  • Fixed confirmation screen: hidden fields (show_if=false) are now excluded
  • Fixed mail body: empty fields and hidden fields are now excluded
  • Added confirm: false support for step forms
  • Added built-in placeholders: {site_name}, {site_url}, {date}, {time}
  • Added admin form list page with lint warnings and shortcode copy buttons
  • Strengthened schema lint: all 15 field types, cascade_from, chatbot bot_message
  • Added wp_mail() failure logging when WP_DEBUG is enabled

1.2.0

  • Added field types: radio, checkbox_group, number, date, file
  • Added chatbot UI mode (step_mode: chatbot) with typing animation
  • Added 4 completion patterns: message, custom HTML, redirect, redirect_rules
  • Added default values (value key on any field)
  • Added multiple recipients (to as array)
  • Added confirm: false for immediate submission
  • Added cascade select (cascade_from / cascade_options)

1.1.0

  • Added step forms (groups and one_by_one mode)
  • Added reCAPTCHA v2 and v3
  • Added privacy policy field
  • Added auto-reply email
  • Added SMTP configuration (Gmail, SendGrid, Mailgun, custom)
  • Added iframe embedding with CORS support
  • Added conditional logic (show_if, required_if, skip_if, to_rules, subject_rules)
  • Added CSS customization options

1.0.0

  • Initial release
  • Schema-driven form rendering
  • htmx-powered input → confirm → complete flow
  • Admin notification email and auto-reply
  • Honeypot spam protection

Plugin Website
Visit website

Author
youheiokubo
Version:
1.4.6
Last Updated
July 10, 2026
Requires
WordPress 6.0
Tested Up To
WordPress 7.0.1
Requires PHP
7.4

Share Post

Join our newsletter.

Get insights into what’s happening at ChangelogWP right in your inbox. We don’t believe in spam.