Hi, I'm creating an animation for the submit button on Hubspot embedded forms. I"m using the global form events and realized my code gets run twice onFormReady.
I'm looking for help on preventing this from happening. Below is a sample of my code, that is supposed to create 3 spans after the input[type-submit] but ends of creating another span for each.
I will also be running a simple script onFormSubmit and onFormSubmitted, and I'm concerned if those events will cause the same problem (haven't gotten that far yet though).
Since two forms are on the page, onFormReady triggers twice.
If you place your onFormReady callback within the embed code for the first form (ID: 0462ba2b-55a3-4a6e-89e5-16d37de23114), you should be able to avoid this.
Are you still encountering this issue? I haven't been able to replicate this behavior in my own account. The script I have within onFormReady triggers once, as expected.
Can you share an example page with this script implemented so I can take a look?
Since two forms are on the page, onFormReady triggers twice.
If you place your onFormReady callback within the embed code for the first form (ID: 0462ba2b-55a3-4a6e-89e5-16d37de23114), you should be able to avoid this.