=== TigerElements Visual Form Canvas for Contact Form 7 ===
Contributors: tigerelements
Tags: contact form 7, visual builder, drag and drop, file upload, redirect
Requires at least: 6.5
Tested up to: 7.1
Stable tag: 2.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tigerelements-visual-form-canvas-cf7

Drag-and-drop builder for Contact Form 7 featuring a visual canvas, multi-file uploads, and global redirects.

== Description ==

Stop building Contact Form 7 forms with confusing tags and manual coding. **TigerElements Visual Form Canvas for Contact Form 7** gives you a modern, intuitive canvas to build professional forms in seconds.

Whether you need a simple contact form or a complex multi-column layout, this builder handles it all visually.

### 🚀 Key Features:
* **Intuitive Drag & Drop:** Build your form layout on a visual canvas.
* **Advanced Multi-File Upload:** A premium file upload experience. Files stay selected even when adding more, and users can delete individual files before sending.
* **Smart Redirects:** Easily set a "Thank You" page redirect (same tab or new tab) directly within the form settings.
* **Layout Rows:** Support for 1 and 2-column rows out of the box to create clean, responsive designs.
* **Direct Access:** Use the "New Visual Form" menu link to jump straight into the builder and start creating.
* **Developer Friendly:** Optimized code with versioning and security nonces to ensure a smooth, secure experience.

== Installation ==

1. Upload the `tigerelements-visual-form-canvas-cf7` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Make sure **Contact Form 7** is also installed and active.
4. Go to **Contact > New Visual Form** to start building your first visual form!

== Frequently Asked Questions ==

= Does this replace Contact Form 7? =

No. It adds a "Visual Builder" tab to the Contact Form 7 editor. Your forms stay
ordinary Contact Form 7 forms, and the Form tab keeps working exactly as before.

= What happens to a form I built by hand? =

You can open it in the Visual Builder and keep editing it there. Tags the builder
has no field for (for example [recaptcha] or [response]) are listed in a
confirmation prompt and moved to the end of the form rather than removed.

= Which file types can be uploaded? =

Whatever you set in the Multi-File field's "Allowed Types" box, for example
jpg|png|pdf. Uploads are checked on the server against the file's real content,
not just its extension, so a script renamed to .jpg is rejected.

= Is there a file size limit? =

Yes. A Multi-File field with no explicit "Max Size" uses a 1 MB limit, matching
Contact Form 7's own default. Set "Max Size" on the field to allow larger files.

= Where do I set the after-submit redirect? =

In the Visual Builder tab, under "After Submit Action". Tick "Enable Redirect"
and enter the URL, then save the form.

== Screenshots ==

1. The Visual Builder canvas with the drag-and-drop elements sidebar.
2. The enhanced Multi-File upload interface on the frontend.
3. Global settings for After-Submit Redirects.

== Changelog ==

= 2.2 =
* Security: Multi-File uploads are now validated on the server. The file's real
  content is checked against the field's Allowed Types, not just its extension,
  so a script renamed to .jpg is rejected. Uploads that fail are reported with
  Contact Form 7's own error message instead of being discarded silently.
* Security: Multi-File fields with no explicit "Max Size" now default to a 1 MB
  limit, matching Contact Form 7's own default for [file]. Previously there was
  no limit. If your forms accept larger files, set Max Size on the field.
* Fixed: saving an existing form through the Visual Builder could delete fields.
  Tags written as plain text at the top level of the form body -- how
  hand-written and stock Contact Form 7 forms are laid out -- were never loaded
  onto the canvas and were dropped when the form was rebuilt, in a typical form
  removing the submit button, file uploads and the acceptance checkbox with no
  warning. Such tags are now adopted onto the canvas.
* Fixed: [acceptance] lost its consent wording and closing tag when a form was
  rebuilt. The whole block is now preserved.
* Fixed: CF7 tags the builder cannot represent (for example [recaptcha] or
  [response]) were deleted without warning. They are now listed in a
  confirmation prompt and moved to the end of the form, including tags typed
  into the Form tab after the builder loaded.
* Fixed: opening a [textarea] field's settings and saving converted it into a
  single-line [text] field.
* Fixed: turning off "Enable Redirect" now actually clears the saved redirect.
* Fixed: the redirect took effect only after pressing "Sync & Save Form".
  Ticking "Enable Redirect" and pressing Contact Form 7's own Save button
  stored the setting but produced no redirect. The saved setting is now
  authoritative.
* Fixed: attachments are no longer copied twice when a second mail template is
  in use.
* Fixed: a JavaScript error on the Contact Forms list screen.
* Fixed: plugin styles no longer override `.row`, `.col-md-*` or `.form-label`
  outside the form. Themes using those class names are no longer affected.
* Fixed: a quote character in a placeholder or default value no longer corrupts
  the generated tag.
* Fixed: labels only carry a `for` attribute when the input really has that id,
  so a label never points at nothing.
* Added: builder and front-end text is now translatable, with a translation
  template in /languages.
* Added: an uninstall routine that removes the plugin's post meta.
* Compatibility: tested up to WordPress 7.1 and Contact Form 7 6.1. Minimum
  WordPress raised to 6.5, which is what the `Requires Plugins` header needs.

= 2.1 =
* Initial Public Release.
* Added Persistent Multi-File upload logic.
* Added Global Redirect shortcode and handler.
* Optimized backend UI for faster form syncing.
* Fixed text domain and security nonce issues for official repository compliance.

== External services ==

This plugin does not connect to any external service. It makes no remote HTTP
requests, loads no third-party scripts, fonts or stylesheets, and transmits no
data off your site. Uploaded files are stored only in Contact Form 7's own
temporary upload directory and attached to the emails Contact Form 7 sends.

== Upgrade Notice ==

= 2.2 =
Security release. Multi-File uploads are now validated on the server, and fields with no "Max Size" default to a 1 MB limit. If your forms accept larger files, set Max Size before updating.

= 2.1 =
This is a major upgrade. Please save your forms after updating to ensure the new Visual Builder settings are synced correctly.