Refresh/attach page forms on pages loaded by AJAXSOLVE
2 weeks ago - last edited 2 weeks ago
I'm currently integrating hubspot forms on a website that uses barbajs which is a common plugin to fetch the new pages with AJAX and replaces the content inside a wrapper, thus not needing to re-fetch header and footer on each page load.
Although this breaks the scripts from finding the new page forms.
The forms are loaded this way inline in the html.
I have been checking the docs and inspecting the window.hbspt object but I haven't found any ways to make forms re-attach to the new html content. I have already found solutons for many other embedded services like youtube, vimeo with their api's. But nothing yet for HubSpot.
Does anyone have any suggestions or ideas of what I could do?
Solved! Go to Solution.