=== FormCourier Modal Window ===
Contributors: densslav
Tags: modal, popup, forms, shortcode, contact form
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Open WordPress forms and shortcode content in an accessible modal from buttons, links, or any elements with configured CSS classes.

== Description ==

FormCourier Modal Window is a lightweight plugin for displaying WordPress forms and other shortcode-generated content in an accessible modal window.

Add a shortcode in the plugin settings, configure one or more CSS trigger classes, and any matching button, link, or other element can open the same modal.

The plugin focuses on one task. It does not include a form builder, marketing automation, analytics, tracking, or an external service. The shortcode content is generated by WordPress or by the plugin that registered the shortcode.

Features:

* Display WordPress shortcode content inside a modal window.
* Open the same modal from any number of buttons, links, or other elements.
* Configure multiple trigger CSS classes.
* Support dynamically added trigger elements through event delegation.
* Close the modal with the close button, backdrop click, or Escape key.
* Keep keyboard focus inside the open dialog and return focus to the trigger after closing.
* Respect reduced-motion preferences.
* Load frontend assets only when a shortcode and at least one trigger class are configured.
* No external API requests, tracking, or remote dependencies.

== Installation ==

1. Upload the plugin ZIP from Plugins > Add Plugin > Upload Plugin, or install it from the WordPress Plugin Directory after publication.
2. Activate FormCourier Modal Window.
3. Open FormCourier Modal Window in the WordPress admin menu.
4. Enter the shortcode that should be displayed inside the modal.
5. Enter one or more trigger CSS classes.
6. Save the settings.
7. Add one of the configured classes to any button, link, or other element that should open the modal.

Example trigger classes:

`open-email-modal`
`header-contact-button`
`footer-contact-button`

The leading dot is optional in the settings. Classes can be entered one per line or separated by spaces or commas.

== Usage ==

For example, configure this shortcode:

`[contact-form-7 id="123" title="Contact form"]`

Then configure this trigger class:

`open-contact-modal`

Add `open-contact-modal` as a CSS class to a button or link on the site. Clicking that element opens the configured shortcode content in the modal.

The plugin uses event delegation, so matching elements added dynamically after page load can also open the modal.

== Screenshots ==

1. Configure the shortcode and one or more trigger CSS classes on the FormCourier Modal Window settings page.
2. An example shortcode-rendered contact form displayed in the accessible modal window.

== Frequently Asked Questions ==

= Which form plugins are supported? =

The plugin can display content generated by any standard WordPress shortcode. This includes form plugins that register shortcodes, such as Contact Form 7 and similar plugins.

= Can multiple buttons open the same modal? =

Yes. Add any configured trigger class to as many buttons, links, or other elements as needed.

= Can I configure more than one trigger class? =

Yes. Enter classes one per line or separate them with spaces or commas. Any configured class can open the modal.

= Does FormCourier Modal Window include a form builder? =

No. The plugin displays content generated by an existing WordPress shortcode.

= Does the plugin send data to external servers? =

No. FormCourier Modal Window does not make external API requests or transmit visitor data by itself.

= Does it work with dynamically added elements? =

Yes. Trigger clicks are handled using event delegation, so matching elements added after page load can open the modal.

= What happens to form submissions? =

FormCourier Modal Window does not process form submissions itself. Submission handling is controlled by the form plugin or other shortcode provider whose content is displayed in the modal.

== Privacy ==

FormCourier Modal Window does not collect, store, or transmit visitor data by itself.

Any data submitted through content displayed inside the modal is handled by the plugin or service that provides the configured shortcode. Review that plugin or service's privacy behavior separately.

== Changelog ==

= 1.1.1 =
* Added WordPress.org directory screenshots and visual assets.

= 1.1.0 =
* Renamed the plugin to FormCourier Modal Window.
* Changed the plugin slug and text domain to `formcourier-modal-window`.
* Updated internal prefixes and asset handles to the FormCourier Modal Window namespace.
* Added compatibility with WordPress 7.1 and tested with WordPress 7.1.2.
* Added settings migration from previous option names.
* Added uninstall cleanup for plugin settings.
* Improved documentation, privacy information, and FAQ.
* Preserved accessible keyboard and focus behavior.

= 1.0.0 =
* Initial release.
