<?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 Form with custom redirect not capturing entries on iPhone in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Form-with-custom-redirect-not-capturing-entries-on-iPhone/m-p/871326#M36531</link>
    <description>&lt;P&gt;I have a form set up with a custom redirect added into the embed code based off of the form entry. For some reason, this code is causing submissions from iPhones to not register in HubSpot. When I remove those lines of code, submissions go through. With the lines of code added in, submissions are registered from desktops, iPads, and Android phones, but not iPhones. Any reasons why this could be happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;hbspt.forms.create({&lt;BR /&gt;region: "na1",&lt;BR /&gt;portalId: "40238620",&lt;BR /&gt;formId: "3dfe8346-288f-43fe-bc84-e2b55d39f3f6",&lt;BR /&gt;target: ".form-column",&lt;BR /&gt;onFormSubmit: function($form) {&lt;BR /&gt;var choice = $form.find('input[name=desired_wedding_package]:checked').val();&lt;BR /&gt;if (choice == 'Best Weekend Ever') {&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/schedule-a-tour-date-time/" target="_blank" rel="noopener"&gt;https://zionsprings.com/schedule-a-tour-date-time/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;else if (choice == 'Best Day Ever'){&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/schedule-a-tour-date-time/" target="_blank" rel="noopener"&gt;https://zionsprings.com/schedule-a-tour-date-time/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;else if (choice == 'Mini-mony'){&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/book-elopement-meeting/" target="_blank" rel="noopener"&gt;https://zionsprings.com/book-elopement-meeting/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;else if (choice == 'Elopement'){&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/book-elopement-meeting/" target="_blank" rel="noopener"&gt;https://zionsprings.com/book-elopement-meeting/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;else if (choice == "I don't know yet"){&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/schedule-a-tour-date-time/" target="_blank" rel="noopener"&gt;https://zionsprings.com/schedule-a-tour-date-time/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2023 19:22:38 GMT</pubDate>
    <dc:creator>GBogle</dc:creator>
    <dc:date>2023-10-27T19:22:38Z</dc:date>
    <item>
      <title>Form with custom redirect not capturing entries on iPhone</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Form-with-custom-redirect-not-capturing-entries-on-iPhone/m-p/871326#M36531</link>
      <description>&lt;P&gt;I have a form set up with a custom redirect added into the embed code based off of the form entry. For some reason, this code is causing submissions from iPhones to not register in HubSpot. When I remove those lines of code, submissions go through. With the lines of code added in, submissions are registered from desktops, iPads, and Android phones, but not iPhones. Any reasons why this could be happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;hbspt.forms.create({&lt;BR /&gt;region: "na1",&lt;BR /&gt;portalId: "40238620",&lt;BR /&gt;formId: "3dfe8346-288f-43fe-bc84-e2b55d39f3f6",&lt;BR /&gt;target: ".form-column",&lt;BR /&gt;onFormSubmit: function($form) {&lt;BR /&gt;var choice = $form.find('input[name=desired_wedding_package]:checked').val();&lt;BR /&gt;if (choice == 'Best Weekend Ever') {&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/schedule-a-tour-date-time/" target="_blank" rel="noopener"&gt;https://zionsprings.com/schedule-a-tour-date-time/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;else if (choice == 'Best Day Ever'){&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/schedule-a-tour-date-time/" target="_blank" rel="noopener"&gt;https://zionsprings.com/schedule-a-tour-date-time/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;else if (choice == 'Mini-mony'){&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/book-elopement-meeting/" target="_blank" rel="noopener"&gt;https://zionsprings.com/book-elopement-meeting/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;else if (choice == 'Elopement'){&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/book-elopement-meeting/" target="_blank" rel="noopener"&gt;https://zionsprings.com/book-elopement-meeting/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;else if (choice == "I don't know yet"){&lt;BR /&gt;window.location.href = '&lt;A href="https://zionsprings.com/schedule-a-tour-date-time/" target="_blank" rel="noopener"&gt;https://zionsprings.com/schedule-a-tour-date-time/&lt;/A&gt;';&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 19:22:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Form-with-custom-redirect-not-capturing-entries-on-iPhone/m-p/871326#M36531</guid>
      <dc:creator>GBogle</dc:creator>
      <dc:date>2023-10-27T19:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Form with custom redirect not capturing entries on iPhone</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Form-with-custom-redirect-not-capturing-entries-on-iPhone/m-p/871486#M36532</link>
      <description>&lt;P&gt;You are using the wrong form submit action.&amp;nbsp;&lt;A href="https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options" target="_blank"&gt;https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;onFormSubmit is used after the validation, but before the form data is submitted.&lt;/P&gt;
&lt;P&gt;onFormSubmitted is used after the validation is complete AND the form data is submitted to hubspot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically what is happening is the form is redirecting before any data is submitted. I cannot explain why in your testing scenario that this is happening only on iPhones. This thread gives some different use case examples as well that is worth reading through to help with how to set this up:&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235041" target="_blank"&gt;https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235041&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2023 13:01:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Form-with-custom-redirect-not-capturing-entries-on-iPhone/m-p/871486#M36532</guid>
      <dc:creator>Ben_M</dc:creator>
      <dc:date>2023-10-28T13:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Form with custom redirect not capturing entries on iPhone</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Form-with-custom-redirect-not-capturing-entries-on-iPhone/m-p/872805#M36538</link>
      <description>&lt;P&gt;I have tried using onFormSubmitted and the page does not redirect anymore.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 18:48:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Form-with-custom-redirect-not-capturing-entries-on-iPhone/m-p/872805#M36538</guid>
      <dc:creator>GBogle</dc:creator>
      <dc:date>2023-10-31T18:48:20Z</dc:date>
    </item>
  </channel>
</rss>

