Description
This feature was requested once before (PostHog/posthog#18245) but it doesn't appear to be fully implemented. renderSurvey
was added (#1324) to address the feature request but instead of adding the ability to programmatically hide/show, it takes over the rendering process. This leaves us having to provide our own styling and custom elements to support what's rendered. This feature is great if you are just wanting to take over the rendering process.
However, my request is purely around the ability to hide/show it which i believe is what the original issue was about.
I would like a function, show
/hide
for example, that allows me to purely render the out of the box survey from posthog. My intent is to have this survey appear when someone clicks a button instead of automatically when the user visits the page. I understand there are options in the UI to do this, but it renders a button on the page that I don't have any control over (outside of basic styling).
I have a custom button, somewhere on the page that i control. When a user clicks that button, I want to show my survey. If it were possible to provide options around the location of where the survey is rendered (over the current element, default, center of screen, etc...), that would be great too.