Modals (Popups)
A modal is a popup you define once in Promptless WP → Modals and open from any section button, or automatically on the pages you choose. Its most common use is a Promptless Forms form, such as a quote request, opened from a “Get a quote” button. A modal takes its colours, corners and button styles from your Global Settings, and only loads on pages that use it.
When to use it
Section titled “When to use it”- A button should open a form, a video or a short message without leaving the page.
- A page should offer something once a visitor has read part of it or is about to leave.
- For a notice on every page, use the Promptless theme’s Announcement Bar instead. For content that belongs in the page, use a section.
How to create a modal
Section titled “How to create a modal”- Go to Promptless WP → Modals.
- Under Add New Modal, fill in Title (admin label). Visitors never see it; the modal’s ID is made from it on first save.
- Optionally fill in Heading, which visitors see and screen readers announce as the popup’s name.
- Write the Body. It is a rich-text editor with Add Media, and can hold a form shortcode such as
[pforms_form id="quote"]. - Choose Size, Theme and how it opens (see Options).
- Select Save Modal. The modal appears under Existing Modals with its ID.
How to open a modal from a button
Section titled “How to open a modal from a button”- In the Promptless WP editor, open the section with the button.
- In the button’s settings, set Link to to Modal.
- In Modal ID, enter the modal’s ID from the Existing Modals list.
A button opens either an address or a modal, not both. A button that opens a modal always works, on any device and however often it is clicked. An element outside Promptless sections with the attribute data-aisb-modal-open="modal-id" also opens the modal, but only on pages where the modal is already loaded: a page with a section button that opens it, or a page on its automatic-opening list. Developers can load it on other pages with the aisb_modal_referenced_ids filter.
Options
Section titled “Options”| Option | What it does | Default |
|---|---|---|
| Size | Small (420px), Medium (600px) or Large (860px) wide. On a phone the modal fills the screen. | Medium |
| Theme | Light or Dark. | Light |
| Dismissible (Escape key and backdrop click close the modal) | When off, only the close button closes it. Use this for a message visitors must acknowledge. | On |
| Close when clicking the backdrop | Clicking outside the modal closes it. Only when dismissible. | On |
| How the modal opens | On click (a button or element opens it), Automatically on page load (after a delay), On exit intent (desktop only) or After scrolling a percentage of the page. | On click |
| Delay before opening (seconds) | For page load. At least 3 and at most 60 seconds. | 5 |
| Open after scrolling | For scroll depth: 25%, 50% or 75% of the page. | 50% |
| How often to show it | For automatic opening: Every visit, Once per session, Once per visitor (~30 days) — recommended, or Once ever. | Once per visitor |
| Show on all pages (site-wide) | For automatic opening. Clear it and enter comma-separated page IDs to limit it to those pages. | On |
| Allow auto-open on mobile (≤767px) | Lets automatic opening happen on phones. | Off |
| Close the modal after a successful form submission | Closes the modal once a Promptless Forms form inside it shows its success message, after Delay before closing (seconds) (0–10). | Off, 2 seconds |
How automatic opening behaves
Section titled “How automatic opening behaves”- At most one automatic popup per page view. If a page has a page-load modal and an exit-intent or scroll modal, the page-load one takes precedence.
- Exit intent is desktop only. It fires when the mouse leaves through the top of the window. Phones have no such gesture, so it never fires there.
- Off on phones by default. Google ranks pages lower when a popup covers the content on mobile. Turn on Allow auto-open on mobile (≤767px) only if you accept that risk. Button-opened modals are not affected.
- Editing re-arms it. A visitor who dismissed a modal sees it again, once, after you change its content or how it opens.
- Submitting counts as dismissing. A visitor who submits the form inside a modal is treated as having closed it.
Accessibility
Section titled “Accessibility”Every modal behaves as an accessible dialog without any setting: focus moves into it when it opens and stays there, a close button is always present, Escape closes it when it is dismissible, focus returns to the button that opened it, the page behind it does not scroll, and its animation is reduced for visitors who ask for reduced motion.
Limits and common problems
Section titled “Limits and common problems”- The button does nothing. The Modal ID does not match a saved modal. Copy the ID from Existing Modals.
- A modal does not open automatically. The visitor has already seen or dismissed it under How often to show it, the page is not in its page list, or you are on a phone with mobile auto-open off. To test again, use a private browser window.
- Modals cannot contain other sections. The body is rich text, media and shortcodes. Content that needs full sections belongs on its own page.
- One modal at a time. A button inside a modal that opens another modal replaces the first.
- Who can manage modals. The Modals screen needs the
promptless_manage_settingscapability. An AI assistant can also create and change modals through the connector; see What the Assistant Can Do.