0
I am embedding 2 typeform on my webpage. When I submit 1st typefrom onSubmit function get executed, but onSubmit function of 2nd typeform get called automatically even I submitted the 1st typeform.
1<div id="my-embedded-typeform1" style="width: 100%; height: 300px;"></div>2<div id="my-embedded-typeform2" style="width: 100%; height: 300px;"></div>34<script src="https://embed.typeform.com/embed.js" type="text/javascript"</script>5 window.addEventListener("DOMContentLoaded", function() {6 var el = document.getElementById("my-embedded-typeform1");7 var el2 = document.getElementById("my-embedded-typeform2");8 window.typeformEmbed.makeWidget(el1, "https://admin.typeform.com/to/cVa5IG", {9 hideFooter: true,10 onSubmit: () => { alert('Typeform 1 submitted') }11 });12window.typeformEmbed.makeWidget(el2, "https://admin.typeform.com/to/cVa5IG", {13 hideFooter: true,14 onSubmit: () => { alert('Typeform 2 submitted') }15 });16 });