<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Listening to a form submission event in an Iframe in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/780809#M63079</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/133120"&gt;@MatthiasWeber&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found a solution using the&amp;nbsp;onFormSubmit&lt;SPAN&gt; callback function. it will be called when the form is submitted&lt;/SPAN&gt;-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;hbspt.forms.create({&lt;BR /&gt;region: "na1",&lt;BR /&gt;portalId: "53532847",&lt;BR /&gt;formId: "52f66149-abe1-5f39-9b47-ca345171832f",&lt;BR /&gt;onFormSubmit: function(form) {&lt;BR /&gt;setTimeout(function() {&lt;BR /&gt;$(".gated-content_component").hide();&lt;BR /&gt;}, 2000);&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Apr 2023 11:32:59 GMT</pubDate>
    <dc:creator>SZadik</dc:creator>
    <dc:date>2023-04-12T11:32:59Z</dc:date>
    <item>
      <title>Listening to a form submission event in an Iframe</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/777305#M62785</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We have an Hubspot form embed on our webflow website in an iframe. The form is inside a popup.&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We want to run a JQuery/ JS function that listens to the HubSpot form submission and hides the popup modal (the form container) once submitted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;since the form is in an iframe we need to be able to listen to events inside the iframe.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is this possible? any tips/code will be super helpful!&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 11:21:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/777305#M62785</guid>
      <dc:creator>SZadik</dc:creator>
      <dc:date>2023-04-03T11:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Listening to a form submission event in an Iframe</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/778036#M62835</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/499952"&gt;@SZadik&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for reaching out. Let's invite some community members into the conversation — hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/133120"&gt;@MatthiasWeber&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2450"&gt;@tjoyce&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;, have you helped any of your clients with similar projects? Do you have any suggestions on how they can tackle this? Or, if not, do you have any suggestions on other ways you've solved similar challenges?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 18:47:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/778036#M62835</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-04-04T18:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Listening to a form submission event in an Iframe</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/778037#M62836</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/499952"&gt;@SZadik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any chance you have a link that we can use? I want to see what events are pushed to the page on form load / submit.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 18:53:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/778037#M62836</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2023-04-04T18:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Listening to a form submission event in an Iframe</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/778039#M62837</link>
      <description>&lt;P&gt;I'm afraid&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/499952"&gt;@SZadik&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;i don't have a solution. Communications between iframe and parent is a pain in the xxx:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/9153445/how-to-communicate-between-iframe-and-the-parent-site" target="_blank"&gt;https://stackoverflow.com/questions/9153445/how-to-communicate-between-iframe-and-the-parent-site&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;me "bad idea" would be to have a timer activated while the popup is active. Every 5 secods the timer is analyzing the content of the iframe:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/926916/how-to-get-the-bodys-content-of-an-iframe-in-javascript" target="_blank"&gt;https://stackoverflow.com/questions/926916/how-to-get-the-bodys-content-of-an-iframe-in-javascript&lt;/A&gt;&amp;nbsp;- if there somewhere a "conformation-information" you can close the popup.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know this is a really bad-idea. Maybe some real js-expert has a fancy and nice solution. In the meanwhile: try to use my bad magic. I hope it helps ...&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 18:54:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/778039#M62837</guid>
      <dc:creator>MatthiasWeber</dc:creator>
      <dc:date>2023-04-04T18:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Listening to a form submission event in an Iframe</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/779832#M62996</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&amp;nbsp;, Thanks for your reply! We had some bug on the website but now I can share the link -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://aggua-site.webflow.io/ebooks/data-catalog-buy-or-build-open-source-or-closed-source" target="_blank"&gt;https://aggua-site.webflow.io/ebooks/data-catalog-buy-or-build-open-source-or-closed-source&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We aim to close the popup once the form is submitted. Do you think we can listen to the submission event inside the iframe?&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 09:54:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/779832#M62996</guid>
      <dc:creator>SZadik</dc:creator>
      <dc:date>2023-04-10T09:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Listening to a form submission event in an Iframe</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/779833#M62997</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/133120"&gt;@MatthiasWeber&lt;/a&gt;&amp;nbsp;, I'm not a JS expert but i'll look into the links you've sent.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 09:55:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/779833#M62997</guid>
      <dc:creator>SZadik</dc:creator>
      <dc:date>2023-04-10T09:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Listening to a form submission event in an Iframe</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/780809#M63079</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/133120"&gt;@MatthiasWeber&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found a solution using the&amp;nbsp;onFormSubmit&lt;SPAN&gt; callback function. it will be called when the form is submitted&lt;/SPAN&gt;-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;hbspt.forms.create({&lt;BR /&gt;region: "na1",&lt;BR /&gt;portalId: "53532847",&lt;BR /&gt;formId: "52f66149-abe1-5f39-9b47-ca345171832f",&lt;BR /&gt;onFormSubmit: function(form) {&lt;BR /&gt;setTimeout(function() {&lt;BR /&gt;$(".gated-content_component").hide();&lt;BR /&gt;}, 2000);&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 11:32:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/780809#M63079</guid>
      <dc:creator>SZadik</dc:creator>
      <dc:date>2023-04-12T11:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Listening to a form submission event in an Iframe</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/781035#M63093</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/499952"&gt;@SZadik&lt;/a&gt;! Thank you very much for taking the time to post your solution &lt;span class="lia-unicode-emoji" title=":raising_hands:"&gt;🙌&lt;/span&gt; We appreciate you! — Jaycee&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 18:02:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Listening-to-a-form-submission-event-in-an-Iframe/m-p/781035#M63093</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-04-12T18:02:40Z</dc:date>
    </item>
  </channel>
</rss>

