APIs & Integrations

ironshield
Participant

Re-initializing form embed

Is there any way to re-initialize a form (e.g. hbspt.forms.create)? I’m trying to override the behavior of the “Blog Email Subscription” form to add my own callback function.

Can I destroy and recreate the form? Or, even better, can I change the some properties and re-initialize?

The recommendations I’ve already received are to just use the form embed code. But this isn’t an option in my case.

0 Upvotes
3 Replies 3
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Re-initializing form embed

Hi @ironshield,

This is on a HubSpot page, correct? Can you send me a link to the page so that I can do some troubleshooting?

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Re-initializing form embed

Hi @ironshield,

You can re-run the form create method to rebuild a form if necessary; see the details in this topic here:

0 Upvotes
ironshield
Participant

Re-initializing form embed

It doesn’t seem to work for me. I try to do this inside $(window).load. But the form doesn’t update.

No error messages in the console. :frowning:

0 Upvotes