FormCourier Modal Window

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 and optionally enable a floating call-to-action button. You can also configure CSS trigger classes so matching buttons, links, or other elements 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.
  • Enable an optional floating button that opens the modal without adding a CSS class to a page element.
  • Choose the floating button’s background color, bottom-left or bottom-right position, and an image from the WordPress Media Library. A paper-plane icon is used when no image is selected.
  • Respect reduced-motion preferences for the floating button animation.
  • 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 a trigger class or the floating button are configured.
  • No external API requests, tracking, or remote dependencies.
  • Automatically detects all languages configured in Polylang.
  • Supports language-specific shortcodes with WPML.
  • Falls back to the default language shortcode when a translation is not configured.

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.

Alternatively, enable Show floating button in the plugin settings. The button opens the configured modal without a trigger class. It is disabled by default, including when upgrading an existing installation. Select an image from the Media Library, or use the default paper-plane icon; set a background color and choose the bottom-left or bottom-right position.

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.

Screenshots

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 a shortcode for each detected site language.
  5. Enable the optional floating button and choose its position, color, and image, or enter one or more trigger CSS classes.
  6. Save the settings.
  7. If using trigger classes, add one of the configured classes to each 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.

FAQ

Does it support multilingual sites?

Yes. The plugin automatically detects all languages configured in Polylang and creates a shortcode field for each language. WPML active languages are also supported. On the frontend, the shortcode for the current language is displayed automatically.

What happens if a shortcode is not configured for the current language?

The plugin falls back to the default site language shortcode. If that is also empty, it uses the first configured shortcode.

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 open the modal using a floating button?

Yes. Enable the floating button in the plugin settings and configure its position, background color, and optional Media Library image. It works without a trigger class when a shortcode is configured.

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.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“FormCourier Modal Window” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.3.5

  • Added an optional floating call-to-action button with a customizable image, background color, and bottom-left or bottom-right position.
  • Added a default paper-plane icon and reduced-motion support for the button animation.
  • Kept existing Forminator styling and trigger compatibility when upgrading.

1.2.5

  • Kept compatibility with theme buttons that handle their own click event while ignoring modified and non-primary clicks.

1.2.4

  • Added a self-contained, theme-variable-aware layout for Forminator forms in the modal.
  • Prevented modal triggers from handling modified and non-primary clicks, improving compatibility with interactive widgets.

1.2.1

  • Added PHPCS annotations for the official WPML API hook names used by the integration.
  • No functional changes to Polylang or WPML language handling.

1.2.0

  • Added automatic detection of all languages configured in Polylang.
  • Added WPML language detection and language-specific shortcode support.
  • Added one shortcode field per detected language.
  • Added automatic frontend shortcode selection based on the current language.
  • Added fallback to the default language shortcode when a translation is not configured.
  • Migrates the previous single shortcode setting to the default language automatically.

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.