I’ve added the web form from the Leadbooster extension to our Next.js app. For that, I adapted the provided embedding code to React. It basically looks like:
The form is initially shown when refreshing the page. However, when switching pages, the “pipedriveWebForms” div stays empty and no iframe is added on subsequent page views. The Script is loaded once, but it’s the same behavior when the script tag gets an id and is therefore loaded on every page view.
Can anybody point me in the right direction how to solve this? I suspect some reinitialization issues in the loader script, but the script itself is pretty opaque (would be nice to have an un-obfuscated version for development).
Hi @tschneid
Welcome to the community and thanks for being patient. I had the chance to check with the concerned team and unfortunately, this is not possible as of now. However, this is in their backlog, and support for dynamic forms can be expected in the future.
In case anyone has the same problem in the future: I had a look at the code and solved it by manually embedding the iframe (in the same way the loader script would’ve done).
I’m aware that this is an unsupported way of embedding the form and it might break in the future when something changes in the loader script. Also, some events from the iframe (like redirecting) are not handled. But it suffices my use case for now.