Skip to content

Dynamic button based survey triggers are not working #7314

Closed

Description

@ibonpintado4

Issue Summary

The engineering team at workera has investigated an issue related to actions not triggering a Formbricks survey. After enabling the debug query param we see that the event listeners are attached at the beginning of a page load mean means that any dynamic button that get's added at a later stage wont be setup with a click listener and trigger a survey to show.

This is most likely due to the listeners being setup using document.querySelectorAll().forEach(el => el.addEventListener("click", fn) rather than listening for all click events and filtering our event targets which match the CSS selector.

According to your documentation (https://formbricks.com/docs/xm-and-surveys/surveys/website-app-surveys/actions#1-click-action) "A Click Action is triggered when a user clicks on a specific element within your application. You can define the element’s inner text, CSS selector or both to trigger the survey."

It does not say that dynamic content is not supported, or that it needs to exist at page load.
With this we are considering this as a bug.

I know we can work around this by implementing in code a click listener and fire a custom action event, but this is more of a short-term ad-hock solution, not a fix to the root problem.

Expected Behavior

Listening for all click events and filtering our event targets which match the CSS selector.

Other information (incl. screenshots, Formbricks version, steps to reproduce,...)

Image

Your Environment

Self-hosted Formbricks

Activity

  1. added theissue type on Feb 19, 2026
  2. added
    bug
    on Feb 19, 2026
  3. Hetsavani commented on Feb 21, 2026

    @Hetsavani

    Hey, If you provide steps to reproduce, I am willing to work on this issue.

  4. ibonpintado4 commented on Feb 23, 2026

    @ibonpintado4
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcustomer request

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions