<?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: Include form fields as redirect URL parameters on an embedded form in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/756089#M61428</link>
    <description>&lt;P&gt;Hi Teun - where do I put this code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 16:08:20 GMT</pubDate>
    <dc:creator>seanm914</dc:creator>
    <dc:date>2023-02-14T16:08:20Z</dc:date>
    <item>
      <title>Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235041#M13937</link>
      <description>&lt;P&gt;I need to embed a HS form on an external (not CoS) website. And when the user submits the form, the redirect URL needs to include form fields as parameters.&lt;/P&gt;
&lt;P&gt;Is this possible?&lt;/P&gt;
&lt;P&gt;We figured out a way of doing this on a CoS landing page using a native HS form, but it was pretty tricky. In this case, I need to embed the form on an external page rather than use a CoS page.&lt;/P&gt;
&lt;P&gt;What I’m trying to accomplish is capture the lead’s info (name, company, email) and then pass that info off to a scheduling app which can use parameters to pre-fill a scheduling form so the user doesn’t have to re-enter their info. And I want to do it through a HS form first so that we capture the lead and source information in HS. If we did it straight in the scheduling app then we could create a lead using Zapier but without Source info.&lt;/P&gt;
&lt;P&gt;Every other form app I’ve used has been able to do this. Still surprised HS can’t do it off the shelf. But I hope someone has a creative workaround. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 23:29:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235041#M13937</guid>
      <dc:creator>lloydsilver</dc:creator>
      <dc:date>2017-04-03T23:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235042#M13938</link>
      <description>&lt;P&gt;You could achieve this by using the onFormSubmit callback and switching the form to use an inline message instead of a redirect (explained below).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;hbspt.forms.create({
    portalId: 'xxxxxxxx',
    formId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
    inlineMessage: 'Your submit message here',
    onFormSubmit: function($form){
        setTimeout( function() {
            var formData = $form.serialize();
            window.location = "http://www.yoururl.com?" + formData;
        }, 250 ); // Redirects to url with query string data from form fields after 250 milliseconds.
    }
});
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Because you have access to the jQuery $form object inside the onFormSubmit listener you can serialize the forms data and append it to a url to redirect to after the form is submitted. &lt;STRONG&gt;This only works if you have the inlineMessage set and disable the redirectUrl for the form.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;See if that helps you out.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 13:11:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235042#M13938</guid>
      <dc:creator>derekcavaliero</dc:creator>
      <dc:date>2017-04-04T13:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235043#M13939</link>
      <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hubspot.com/u/lloyd_silver"&gt;@Lloyd_Silver&lt;/A&gt;,&lt;BR /&gt;
Another way to do this is by re-running the hbspt.forms.create method of the embed code on change to each field and recreating the redirectUrl, appending each field. This changes the context and rebuilds the form on each call. &lt;A class="mention" href="https://community.hubspot.com/u/derekcavaliero"&gt;@derekcavaliero&lt;/A&gt; 's method is probably better, but there are multiple ways to proceed.&lt;/P&gt;
&lt;P&gt;That method looks like this:&lt;/P&gt;
&lt;P&gt;hbspt.forms.create({&lt;BR /&gt;
portalId: ‘[hub_id]’,&lt;BR /&gt;
formId: ‘[form_guid]’,&lt;BR /&gt;
redirectUrl:‘&lt;A href="https://www.domain.com/page" rel="nofollow noopener"&gt;https://www.domain.com/page&lt;/A&gt;’,&lt;BR /&gt;
target:’&lt;SPAN class="hashtag"&gt;#target-node-for-form-build&lt;/SPAN&gt;’&lt;BR /&gt;
});&lt;/P&gt;
&lt;P&gt;In your JS, recall that entire method on change to each field, creating a redirectUrl like:&lt;BR /&gt;
redirectUrl:‘&lt;A href="https://www.domain.com/page?firstname=Lloyd" rel="nofollow noopener"&gt;https://www.domain.com/page?firstname=Lloyd&lt;/A&gt;’. Be sure to include the ‘target’ node so the embed code knows where to rebuilt the form each time.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 13:01:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235043#M13939</guid>
      <dc:creator>robertainslie</dc:creator>
      <dc:date>2017-04-05T13:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235044#M13940</link>
      <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hubspot.com/u/lloyd_silver"&gt;@Lloyd_Silver&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;I'm having the same issue, but on a COS landing page.&lt;BR /&gt;
As you've apparently solved it before, any chance you can share the solution here?&lt;/P&gt;
&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 15:24:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235044#M13940</guid>
      <dc:creator>Jeromecollomb1</dc:creator>
      <dc:date>2018-05-28T15:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235045#M13941</link>
      <description>&lt;P&gt;This worked great for me, just wanted to say thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 20:07:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235045#M13941</guid>
      <dc:creator>Trevor_Hatfield</dc:creator>
      <dc:date>2018-07-16T20:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235046#M13942</link>
      <description>&lt;P&gt;Hey &lt;A class="mention" href="https://community.hubspot.com/u/jeromecollomb"&gt;@Jeromecollomb&lt;/A&gt;, I know it's been a while since you asked your question, but I just posted an answer to another question that might help you out.&lt;/P&gt;
&lt;ASIDE class="quote quote-modified" data-post="6" data-topic="4839"&gt;
  &lt;DIV class="title"&gt;
    &lt;DIV class="quote-controls"&gt;&lt;/DIV&gt;
    &lt;IMG alt="" width="20" height="20" src="https://avatars.discourse.org/v2/letter/j/e9c0ed/40.png" class="avatar" /&gt;
    &lt;A href="https://integrate.hubspot.com/t/pass-field-value-to-url-parameter/4839/6?u=john_ascend"&gt;Pass field value to URL parameter&lt;/A&gt; &lt;A class="badge-wrapper  bullet" href="https://community.hubspot.com/c/forms"&gt;&lt;SPAN class="badge-category-bg" style="background-color: #0E76BD;"&gt;&lt;/SPAN&gt;&lt;SPAN style="" data-drop-close="true" class="badge-category clear-badge" title="Questions about the Forms API, including submitting data to forms and customizing the form embed code."&gt;Forms&lt;/SPAN&gt;&lt;/A&gt;
  &lt;/DIV&gt;
  &lt;BLOCKQUOTE&gt;
    If the form is on a COS page, then i think it is easier than you think (you won't even have to do anything api related) 


Go to edit the form module 


Even if you are going to an internal page, click redirect to external URL 
 
&lt;A class="lightbox" href="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/e/ea41167cd4ae7ecb98ff1e999bc49aff3abb5d93.png" data-download-href="/legacyfs/online/uploads/default/ea41167cd4ae7ecb98ff1e999bc49aff3abb5d93" title="Screen Shot 2018-07-19 at 11.27.04 AM.png" rel="nofollow noopener"&gt;[04%20AM]&lt;/A&gt;


redirect to your desired page and attach whatever contact property you desire via query parameters. 
http://redirect-address.com/the-page?token={{contact.your_internal_property_name}} 


After you click save, you can see your link when you hover over test li…
  &lt;/BLOCKQUOTE&gt;
&lt;/ASIDE&gt;

&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/derekcavaliero"&gt;@derekcavaliero&lt;/A&gt; you are the man. This answer saved me a lot of time!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 15:51:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235046#M13942</guid>
      <dc:creator>John</dc:creator>
      <dc:date>2018-07-19T15:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235047#M13943</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/john_ascend"&gt;@john_ascend&lt;/A&gt; &lt;A class="mention" href="https://community.hubspot.com/u/trevor_hatfield"&gt;@Trevor_Hatfield&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Happy to help!&lt;/P&gt;
&lt;P&gt;One thing I did not mention in my solution was to make 100% sure that you exclude any PII in the form data from being collected by Google Analytics.&lt;/P&gt;
&lt;P&gt;Since we're talking about appending the data to the URL via a query string - GA will automatically capture that data inside its pageview reports. This means you'll likely need to add some custom logic around your tracking to make sure you adhere to the GA terms of use regarding collection of PII.&lt;/P&gt;
&lt;P&gt;If you're using GTM (Google Tag Manager) to implement your web tracking (if you aren't I highly suggest you investigate) - this article is a great resource for understanding how to exclude data from being collected:&lt;BR /&gt;
&lt;ASIDE class="onebox whitelistedgeneric"&gt;
  &lt;HEADER class="source"&gt;
      &lt;IMG src="https://www.simoahava.com/images/favicon.ico" class="site-icon" width="16" height="16" /&gt;
      &lt;A href="https://www.simoahava.com/gtm-tips/remove-pii-google-analytics-hits/" target="_blank" rel="nofollow noopener"&gt;Simo Ahava's blog&lt;/A&gt;
  &lt;/HEADER&gt;
  &lt;ARTICLE class="onebox-body"&gt;
    &lt;/ARTICLE&gt;&lt;/ASIDE&gt;&lt;/P&gt;&lt;DIV class="aspect-image" style="--aspect-ratio:471/454;"&gt;&lt;IMG src="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/1/195e6f5b09dc24f0f0ad977ae71f3e87ecaeac30.png" class="thumbnail" /&gt;&lt;/DIV&gt;

&lt;H3&gt;&lt;A href="https://www.simoahava.com/gtm-tips/remove-pii-google-analytics-hits/" target="_blank" rel="nofollow noopener"&gt;#GTMTips: Remove PII From Google Analytics Hits&lt;/A&gt;&lt;/H3&gt;

&lt;P&gt;Use customTask to automatically strip all personally identifiable information (PII) from requests sent to Google Analytics from your website.&lt;/P&gt;


  
  &lt;DIV class="onebox-metadata"&gt;
    
    
  &lt;/DIV&gt;
  &lt;DIV style="clear: both"&gt;&lt;/DIV&gt;

&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 12:59:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/235047#M13943</guid>
      <dc:creator>derekcavaliero</dc:creator>
      <dc:date>2018-07-23T12:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/285585#M26377</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've the same issue as the same&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2699"&gt;@lloydsilver&lt;/a&gt;&amp;nbsp;. The thing is I want to redirect users to a dynamic URL which already includes a "?".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I want our users to fill a form with their website as one property to be redirected to a URL which include their website.&lt;/P&gt;&lt;P&gt;So if I a fill a form putting: &lt;A href="http://www.mywebsite.com" target="_blank"&gt;http://www.mywebsite.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;People would be redirected to the following URL &lt;A href="http://www.domain.com/simulate.php" target="_blank"&gt;http://www.domain.com/simulate.php&lt;/A&gt;&lt;STRONG&gt;?&lt;/STRONG&gt;url=&lt;A href="http://www.mywebsite.com" target="_blank"&gt;http://www.mywebsite.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I'm not sure to really understand how to use&amp;nbsp;&lt;STRONG&gt;target:’#target-node-for-form-build’&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. I tried the dynamic query string (as i saw in &lt;A href="https://knowledge.hubspot.com/articles/kcs_article/forms/can-i-auto-populate-form-fields-through-a-query-string#create-dynamic-query-strings-with-personalization-tokens-marketing-hub-professional-and-enterprise-legacy-marketing-hub-basic-only" target="_self"&gt;HS knowledge&lt;/A&gt;) but it didn't work neither and i've the feeling it's because of the "?" which is inside the URL.&lt;/P&gt;&lt;P&gt;3. I tried the&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2599"&gt;@derekcavaliero&lt;/a&gt;&amp;nbsp;method but i didn't get how to use&amp;nbsp; &lt;STRONG&gt;window.location = "&lt;A href="http://www.yoururl.com" target="_blank"&gt;http://www.yoururl.com&lt;/A&gt;?" + formData;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 12:59:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/285585#M26377</guid>
      <dc:creator>Gthn</dc:creator>
      <dc:date>2019-08-12T12:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/286493#M26473</link>
      <description>&lt;P&gt;Could someone help me figure out why &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2599"&gt;@derekcavaliero&lt;/a&gt;'s solution is not working?&amp;nbsp;I implemented his&amp;nbsp;solution on the page&amp;nbsp;&lt;A href="https://www.krister.com/language-of-leadership-assessment" target="_self"&gt;https://www.krister.com/language-of-leadership-assessment&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The inline message is appearing when I submit the form, but the page is not redirecting to the page that I put into the window.location.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code that I put into Squarespace.&amp;nbsp; I &lt;STRONG&gt;bolded&lt;/STRONG&gt; the changes I made to your solution:&lt;/P&gt;&lt;PRE&gt;!--[if lte IE 8]&amp;gt;
&amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;![endif]--&amp;gt;
&amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
  hbspt.forms.create({
    portalId: "&lt;STRONG&gt;xxxx&lt;/STRONG&gt;",
    formId: "&lt;STRONG&gt;xxxxx&lt;/STRONG&gt;",
    inlineMessage: 'Your submit message here',
    onFormSubmit: function($form){
        setTimeout( function() {
            var formData = $form.serialize();
            &lt;STRONG&gt;window.location = "https://www.krister.com/success-language-of-leadership-assessment?" + formData;&lt;/STRONG&gt;
        }, 250 ); // Redirects to url with query string data from form fields after 250 milliseconds.
    }
});
&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:29:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/286493#M26473</guid>
      <dc:creator>Kristeru</dc:creator>
      <dc:date>2019-08-27T18:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/287082#M26542</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/102313"&gt;@Gthn&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's continue the conversation in &lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Embedded-Form-submission-amp-redirect-URL-based-on-form/m-p/287080/highlight/true#M26540" target="_self"&gt;this thread&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 21:17:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/287082#M26542</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2019-08-20T21:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/287087#M26545</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/102763"&gt;@Kristeru&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm pretty sure this is because your form is loading in an &lt;CODE&gt;iframe&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see that you have one of the new "themes" enabled &lt;A href="https://app.hubspot.com/forms/4306041/editor/ee5d454a-c3a8-4a7b-bbd6-f13920b6ef60/edit/test" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;in the form editor's&amp;nbsp;&lt;EM&gt;Style &amp;amp; preview&lt;/EM&gt; tab. This causes the form to render in an&amp;nbsp;&lt;CODE&gt;iframe&lt;/CODE&gt;, so I'd recommend reverting to the "old theme" if you need to customize the embed code.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 21:30:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/287087#M26545</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2019-08-20T21:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/294806#M27623</link>
      <description>&lt;P&gt;YOU REALLY ARE THE MAN!@!!! This is it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 23:40:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/294806#M27623</guid>
      <dc:creator>bryansteel</dc:creator>
      <dc:date>2019-10-03T23:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/307905#M29227</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2599"&gt;@derekcavaliero&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you see any reason why this modifying the HubSpot form embed script this way would interfere with how HubSpot receives the data upon submission?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For whatever reason, when I use this method on a Firefox browser the contact is not passed back to HubSpot. Chrome and Safari both function as intended. The default (non-modified) script works fine in Firefox.&amp;nbsp; All are standard browsers with default configurations, *not* in incognito.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;!--[if lte IE 8]&amp;gt;&lt;BR /&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;![endif]--&amp;gt;&lt;BR /&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/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;portalId: "xxxxxxxx",&lt;BR /&gt;formId: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",&lt;BR /&gt;inlineMessage: 'Just a moment please',&lt;BR /&gt;onFormSubmit: function($form){&lt;BR /&gt;setTimeout( function() {&lt;BR /&gt;var formEmail = $form.find('input[name="email"]').val();&lt;BR /&gt;window.location = "&lt;A href="https://www.xxxxx.com/xxxx/?email=" target="_blank"&gt;https://www.xxxxx.com/xxxx/?email=&lt;/A&gt;" + encodeURIComponent( formEmail );&lt;BR /&gt;}, 100 ); // Redirects to url with query string data from form fields after 100 milliseconds.&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 03:25:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/307905#M29227</guid>
      <dc:creator>Albo</dc:creator>
      <dc:date>2019-12-17T03:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/308243#M29272</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/113593"&gt;@Albo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try setting your setTimeout to something higher than 100 milliseconds and see if that helps. I haven't had or seen this issue before - and in theory it shouldn't because the onFormSubmit is processed after the form is validated and request is sent.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My theory is that if you redirect too quickly it may terminate the XHR request over to HubSpot's servers. I haven't actually tested this issue myself yet though - let me know what you find.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 12:57:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/308243#M29272</guid>
      <dc:creator>derekcavaliero</dc:creator>
      <dc:date>2019-12-18T12:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/308352#M29282</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2599"&gt;@derekcavaliero&lt;/a&gt;&amp;nbsp;You're spot on! Setting the redirect back to 250 ms resolved the issue. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 17:52:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/308352#M29282</guid>
      <dc:creator>Albo</dc:creator>
      <dc:date>2019-12-18T17:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/337362#M32884</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4468"&gt;@John&lt;/a&gt;&amp;nbsp; I came across this thread and we are having a very similar issue. I am passing just the email parameter to test from a hubspot form to a wordpress page (that includes the HubSpot tracking cod) . First line is the parameter they way i have it in the redirect and then the second is how it actually comes out. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;?email={{contact.email}}
email=%7B%7Bcontact.email%7D%7D&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I am trying to follor the directions in this &lt;A href="https://knowledge.hubspot.com/forms/can-i-auto-populate-form-fields-through-a-query-string#copy-the-property-s-internal-name" target="_self"&gt;article&amp;nbsp;&amp;nbsp;&lt;/A&gt;but it does not seem to pass the parameter.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 16:24:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/337362#M32884</guid>
      <dc:creator>dimitreliasb</dc:creator>
      <dc:date>2020-05-07T16:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/337407#M32887</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2599"&gt;@derekcavaliero&lt;/a&gt;&amp;nbsp;I am trying to get this solution to work. Your snippet has come the closest to solving our issue however what happens with this code it redirects the page to a 404. Basically it pulls ALL the form data i think when we really only need to pull the email&lt;/P&gt;&lt;P&gt;So the URL string is full of parameters and at some point near the end of that screen it breaks the link.&lt;/P&gt;&lt;P&gt;The URL string looks like this:&lt;/P&gt;&lt;PRE&gt;?firstname=MYNAME&amp;amp;lastname=MYLASTNAME&amp;amp;email=MYEMAIL&amp;amp;company=&amp;amp;number_of_cnc_machines=0&amp;amp;zip=46268&amp;amp;do_you_currently_use_automation=No&amp;amp;hours_per_shift=&amp;amp;shifts_per_weekday=&amp;amp;shifts_per_weekend=&amp;amp;weeks_per_year=&amp;amp;operator_wages_per_hour=&amp;amp;operator_benefit=&amp;amp;system_cost=&amp;amp;hs_context=%7B%22rumScriptExecuteTime%22%3A1019.7899999911897%2C%22rumServiceResponseTime%22%3A1237.7850000048056%2C%22rumFormRenderTime%22%3A3.7949999677948654%2C%22rumTotalRenderTime%22%3A71.98499998776242%2C%22rumTotalRequestTime%22%3A216.79500001482666%2C%22lang%22%3A%22en%22%2C%22disableCookieSubmission%22%3Atrue%2C%22embedAtTimestamp%22%3A%221588874670525%22%2C%22formDefinitionUpdatedAt%22%3A%221588872328355%22%2C%22pageUrl%22%3A%22https%3A%2F%2Fprocobots.com%2Ftester%2F%22%2C%22pageTitle%22%3A%22Tester+-+ProCobots%22%2C%22source%22%3A%22FormsNext-static-3.480%22%2C%22timestamp%22%3A1588874670527%2C%22userAgent%22%3A%22Mozilla%2F5.0+(Windows+NT+10.0%3B+Win64%3B+x64)+AppleWebKit%2F537.36+(KHTML%2C+like+Gecko)+Chrome%2F81.0.4044.138+Safari%2F537.36%22%2C%22referrer%22%3A%22https%3A%2F%2Fprocobots.com%2Fwp-admin%2Fpost.php%3Fpost%3D2280%26action%3Dedit%22%2C%22originalEmbedContext%22%3A%7B%22portalId%22%3A%22209468%22%2C%22formId%22%3A%2296085b29-963b-4ce5-9a65-4f9f3046ee1b%22%2C%22inlineMessage%22%3Atrue%2C%22target%22%3A%22%23hbspt-form-1588874670572-8723872668%22%2C%22hutk%22%3A%22f6a5fcd85d55f675630d59b5873faf7c%22%2C%22shellId%22%3A0%2C%22shell%22%3Atrue%2C%22pageUrl%22%3A%22https%3A%2F%2Fprocobots.com%2Ftester%2F%22%2C%22pageTitle%22%3A%22Tester&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 May 2020 18:22:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/337407#M32887</guid>
      <dc:creator>dimitreliasb</dc:creator>
      <dc:date>2020-05-07T18:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/338752#M33040</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/94047"&gt;@dimitreliasb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you only need to pass 1 value through - simply dig into the form and get the value manually using the $form jQuery collection parameter in the onFormSubmit callback:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;onFormSubmit($form){
  var email = $form.find('input[name="email"]').val();
  var redirectBase = 'https://www.google.com';
  window.location = redirectBase + '?email=' + email;
}&lt;/PRE&gt;
&lt;P&gt;the reason your URL is breaking is because my previous script had a flaw. There are better ways to go about it - but for simple 1 parameter redirect logic - the above is as simple as it gets.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 15:04:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/338752#M33040</guid>
      <dc:creator>derekcavaliero</dc:creator>
      <dc:date>2020-05-13T15:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/431131#M42820</link>
      <description>&lt;P&gt;I built off of Derek's answer because I needed to use the built in landing pages, I was not using the form embed. The following worked for me.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;script&amp;gt;
  //code for redirecting to brew ninja signup flow after they enter their email
  $(document).ready(function() {
    setTimeout(function() {
      var form = $('[data-form-id=xxx-xxx-xx-your-form-id]');
      form.submit(function() {
        var email = $('[data-form-id=xxx-xxx-xx-your-form-id]').find('[name=email]').val();
        setTimeout(function() {
          window.location.href = 'https://yoursite.com?email=' + email;
        }, 500);
      });  
    }, 500);
  });
&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 24 Apr 2021 17:42:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/431131#M42820</guid>
      <dc:creator>Sheamus</dc:creator>
      <dc:date>2021-04-24T17:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Include form fields as redirect URL parameters on an embedded form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/453047#M44664</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2599"&gt;@derekcavaliero&lt;/a&gt;&amp;nbsp;&lt;STRONG&gt;This only works if you have the inlineMessage set and disable the redirectUrl for the form.&lt;BR /&gt;&lt;/STRONG&gt;How to disable redirectUrl for the form?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 08:14:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Include-form-fields-as-redirect-URL-parameters-on-an-embedded/m-p/453047#M44664</guid>
      <dc:creator>andriigo</dc:creator>
      <dc:date>2021-06-30T08:14:08Z</dc:date>
    </item>
  </channel>
</rss>

