=== CraftForms ===
Contributors: mrpsiho
Tags: form, form builder, rest api, email template, dynamic forms
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.8.4
License: GPLv2.1
License URI: http://www.gnu.org/licenses/gpl-2.1.html

CraftForms is a comprehensive tool for building web forms of any complexity! Build forms visually using Gutenberg editor.

== Description ==

CraftForms is a comprehensive tool for building web forms of any complexity! It features a block based form builder, so a user can build forms visually using Gutenberg editor. CraftForms also allows to create REST endpoints for submitting forms by using RESTful API and manage form submissions as DB records and/or emails sent.

== Installation ==

1. Upload `craftforms` to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress


== Frequently Asked Questions ==

= Does it work with any WordPress theme? =

Yes, it works with any WordPress theme. CraftForms is Gutenberg block based forms builder.

== Screenshots ==


== Changelog ==

= 1.8.4 =
* Fixed: fatal error on form submission when another plugin (e.g. ACPT) bundles an incompatible psr/cache version — bundled libraries are now namespace-prefixed to prevent conflicts

= 1.8.3 =
* Improved: minor UI improvements
* Improved: string translations
* Added: "Files" file management UI

= 1.8.2 =
* Security: fixed an important bug in price calculation — the final price is now always determined and verified on the server, and re-verified before checkout and order creation. Updating is recommended for any site using price formulas.
* Improved: if a price formula cannot be evaluated on the server, the submission is refused with a clear message and the reason is written to the error log, instead of the form falling back to a price calculated in the browser
* Improved: WooCommerce cart items are re-priced from the form definition before totals are calculated, so a stale or altered cart price cannot reach an order
* Fixed: "Order again" and cart re-pricing now resolve linked Smart Variables the same way the form itself does, so forms using them are priced correctly on those paths

= 1.8.1 =
* Security: hardened the Send Email action's "Additional Headers" setting against mail header injection — header names are now validated against the allowed character set, control characters in header values are rejected, and From/Sender/Return-Path can no longer be set from this field (which bypassed the validated "From" setting)
* Added: loading indicator for embedded forms — a lightweight CSS spinner fills the embed container while the form loads instead of leaving it blank; it stays hidden on fast loads so it never flashes, and its colour, size, thickness and speed are customizable via CSS custom properties
* Fixed: the "CraftForms" marker on the Products list table was output as raw HTML after the product title; it now appears as a post state alongside "Draft"/"Pending"
* Improved: the mail helper now validates the From address before writing it to the email headers (defensive hardening — no known exploit path in current code)

= 1.8.0 =
* Added: bulk "Add images from Media Library" for Radio/Checkboxes image swatches
* Added: Ambient Scene block (PRO) — field-bound image regions over a background
* Added: GET-param prefill — `?fieldname=value` prefills a matching form field on load
* Added: Abandoned-form capture (silent submissions) with admin status filter and CSV export
* Added: Dynamic Data Binding for Smart Variables ("Dynamic (bound)" kind)
* Added: Dynamic Data picker for taxonomy terms
* Added: Multi-account payment connections for Stripe/PayPal — named, reusable connections (like SMTP Servers), multiple accounts/live+test side by side
* Added: Flexible/continuous time-duration booking mode (PRO) for back-to-back slot booking
* Added: visual split-day marker for same-day turnover (B&B checkout=checkin) dates
* Added: "All Form Data" block for Email/PDF templates — table/list/paragraphs of all submitted fields, empty fields skipped automatically
* Added: Value Presets block (PRO) — one-click badge sets multiple field values at once
* Fixed: JS error ("insertBefore") in the File Upload field when the element is moved/reflowed by a theme or page-builder script after initial render
* Fixed: layered-image visual element (product pages) rendered a layer bound to a hidden field using that field's stale/default value, so e.g. a color-conditional pair of duplicate fields (one hidden by conditional logic) could show the wrong-color hardware regardless of the customer's actual selection

= 1.7.6 =
* Fixed: dynamic validation expression evaluation
* Fixed: it was impossible to not select a default option for Select field

= 1.7.5 =
* Added: Standard validation messages translation UI
* Added: "smart watch" form starter (non WC version)
* Fixed: properly init of abilities API available in the plugin
* Fixed: turnover-day bug for check-in/check-out days
* Improved: updated webhook context, added IP address
* Improved: admin UI for catalog/WC product settings

= 1.7.4 =
* Fixed: bug when the empty stock setting was not properly disabling the stock management

= 1.7.3 =
* Fixed: UI/UX issue leading to misconfiguration
* Improved: Uni CPO converter script

= 1.7.2 =
* Fixed: bug in fields conditional logic
* Fixed: bug in smart variables resolving
* Fixed: displaying datepicker in embedded form
* Fixed: bug of payment success/order fail because of stock in embedded payment form
* Added: payment form mapping tool; payment info in orders
* Added: refund action for orders

= 1.7.1 =
* Fixed: bug with redirect URL compilation
* Added: pre-fill form from GET params (get param equals to form field names)

= 1.7.0 =
* Added: PayPal payment gateway
* Added: optional appointemnt .ics attachment for booking related email
* Added: 2 bookings form starters and 2 WC product starters
* Added: dynamic form data in "return on submit" url
* Improved: Uni CPO -> CraftForms migration script
* Improved: accuracy of styles used in embed form
* Fixed: using payment block with embedded form

= 1.6.1 =
* Added: filter to media library to display attachment uploaded with CF forms
* Added: Finnish translation (Suomi)
* Fixed: displaying correct cart item thumbnail
* Fixed: handling of composite image preview
* Fixed: issue with dependencies used in other plugins

= 1.6.0 =
* Added: "Locked WP mode" setting
* Added: new interactive element Frames Editor
* Improved: adding form through shortcode plus connecting form to WC product to display it on any page
* Improved: double booking prevention by implementing atomic pattern for writing data
* Fixed: bug of adding product to cart
* Fixed: bug with multi file upload

= 1.5.3 =
* Added: examples of form emdbed for astro and hugo
* Fixed: an issue with stripes width setting for Cropper element
* Improved: form editing - blocks are added to Form block automatically

= 1.5.2 =
* Fixed: Astra theme related wrong order for price tag element
* Added: new settings for price tag custom formatting
* Improved: UI related to products/catalog items

= 1.5.1 =
* Fixed: Displaying the form using Elementor's 'add to cart' widget
* Improved: Uni CPO migration failed with radio option type 'text' and pricing setup migration

= 1.5.0 =
* Added: new booking type 'seasonal' (catalog item functionality)
* Added: Order analytics
* Added: form field labels can use dynamic tags
* Improved: displaying WC taxes next to the product price
* Fixed: 'order again' functionality

= 1.4.1 =
* Added: new wp hook 'craftforms_pre_submit'
* Improved: Column 'Used In' now shows form usage in WC products
* Improved: Uni CPO migration script

= 1.4.0 =
* Added: Interactive elements
* Added: Image conditional logic
* Added: PDF Builder — design PDF templates and auto-generate documents from form submissions
* Added: Attach generated PDFs to submissions, WooCommerce orders, and emails
* Added: QR code / barcode form block
* Added: Migrate from Uni CPO (importer for existing Uni CPO products)
* Added: Translations for German, Spanish, Italian, Polish and Ukrainian
* Fixed: various UI and stability improvements

= 1.3.4 =
* Fixed: issue with some starters not being imported correctly in some languages
* Added: MU WP install full support

= 1.3.3 =
* Updated: radio/checkbox option blocks; added 'Card' swatch
* Updated: Pipe/Stickers starters
* Added: Added new starter Print Boards
* Added: New starter "Custom Table"
* Added: Export submissions to CSV
* Added: Export orders to CSV
* Fixed: bugs/issues in the UI of admin pages

= 1.3.2 =
* Fixed: PHP error required a non-existent file in the FREE version

= 1.3.1 =
* Fixed: WP Abilities API guard for older versions

= 1.3.0 =
* Added: repeater form field
* Added: colorpicker form field
* Added: range slider form field
* Added: new WC specific starters
* Added: Error messages style setting
* Added: Encrypting Stripe API keys in DB
* Added: dynamic SKU and stock management functionality

= 1.2.1 =
* Added: 8 starter forms and email templates
* Fixed: JS error related to datepicker
* Fixed: issue related to loading inline embedded payment fields

= 1.2.0 =
* Added: form embed functionality
* Added: WC integration
* Added: new form debug tool
* Fixed: duplicating forms messes with unique form ID

= 1.1.5 =
* Fixed: bug related to saving "Redirect Url" setting
* Fixed: correct render of catalog ID for connected form

= 1.1.4 =
* Improved: booking related settings, added from/until number of days datepicker availability
* Added: Elementor and Bricks native widgets/elements
* Added: submit action "Webhook"
* Fixed: a bug in the file upload field

= 1.1.3 =
* Improved: the accessibility of the forms
* Fixed: custom headers now automatically allowed for CORS for forms enabled for external submissions

= 1.1.2 =
* Fixed: "modern" styles for some field types
* Fixed: (PRO) bug in form submission and proper deducting stock level/booking availability

= 1.1.1 =
* Fixed: styling issue in Gutenberg;
* Fixed: bug in 'linked' smart variable when used with checkboxes;

= 1.1.0 =
* Added: commerce functionality, booking, new starters, styles, blocks and functionality

= 1.0.0 =
* Initial Release
