callback functions not firing when embed is loaded in HTML from CDN
See original GitHub issueHi folks, we use the onSubmit
callback function to perform some handling but this stopped working in the last couple of days. The way we load the embed library is as described in the first code snippet here. You can see a similar sample project at https://boulder-smart-aragon.glitch.me/. The console logs inside of the callback functions never get called.
On the other hand, if using the second method from the linked documentation then it seems to work. A sample project, logging the same events as the previous project, can be found at https://mixed-power-ocelot.glitch.me/.
For our use case we can probably switch to the second method, but it looks like something might have broken the functionality for the first method. Or I’m doing something wrong that I haven’t noticed!
Any help would be appreciated, thank you.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Also experienced the same issue, also started 4 days ago, which caused our site and analytics to freak out (we use the onSubmit callback to redirect to a completion page, as the form is embedded in an iframe on a Wix site). Just tried @martino2k6’s solution and it seems to work. Maybe worth changing the examples in the docs for other users.
We have just discovered that putting the
<script>...</script>
section with the callback functions before<script src="//embed.typeform.com/next/embed.js"></script>
has made it work, but we’ve always had the load script first as far as I can tell from out VCS history 🤷♂️EDIT: Working example at https://glitch.com/edit/#!/aboard-polarized-pincushion.