Appearance
Add a custom trigger embed
Use Custom trigger when the website already has a button, link, menu item, or other call-to-action and that existing element should open the form.
Steps
- Open Publish > Embed and choose Custom trigger.
- Select Show Code.
- Enter the CSS selector for the existing website element, such as
.contact-button,#request-quote, or[data-open-form]. - Choose whether the trigger opens the form in a lightbox or a slide-in panel.
- Keep Prevent default link action enabled when the selected element is a link that should open the form instead of navigating away.
- Enable Open only once per page load when repeat openings should be prevented after the first click.
- Enable Show fallback button when selector is not found only when a basic fixed button should appear if no matching element exists.
- Set the target width and panel side when the slide-in panel target is selected.
- Copy the code to an approved staging page and test selector matching, dynamic page rendering, link prevention, fallback behavior, target open/close behavior, mobile layout, and form completion.
Expected result
The script attaches to matching elements on the host page and opens the selected form target when the visitor clicks them. Repeated clicks are ignored while the target is already open, and elements added after the script loads are also bound automatically.
Limitations
The selector must match elements in the same document where the embed script runs. It cannot bind to elements inside cross-origin iframes. If the selector is invalid or no element matches, the embed does not display anything unless the fallback button setting is enabled.