<?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 Update contact property on form submit in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253017#M22392</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a custom property group called "Salesforce Information". Within this group I've created a custom property called "web_activity_most_recent__c" and set it to hidden on a form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scenario: Everytime a form is submitted, we need this property to be updated with a value dependent on the page the form is submitted from. We currently have over 120 pages with corrsponsponding&amp;nbsp;web_activity_most_recent__c values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;eg. if the visitor submits a form from huddle.com/get-started/ then the value forweb_activity_most_recent__c&amp;nbsp; should be "Downloaded_ebook_collaboration_client-experience", and a different value if the form is submited from another page, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get it to work...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance will be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Herewith my edited form embed code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!--[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: "my-hubspot-code",
formId: "e7075578-e362-4c94-a075-10fb9c74e8e0",
redirectUrl: "/sites/default/files/white-papers-files/huddle_-_accounting_and_professional_services_e-paper_2018.pdf",
onFormReady($form) {
$('input[name="web_activity_most_recent__c"]').val('Downloaded_ebook_collaboration_client-experience').change();
}
});
&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-14 at 12.26.42.png" style="width: 799px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/14935iC923775C7C86B3BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-14 at 12.26.42.png" alt="Screenshot 2019-02-14 at 12.26.42.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-14 at 12.27.26.png" style="width: 866px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/14934i64D827FE004B260B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-14 at 12.27.26.png" alt="Screenshot 2019-02-14 at 12.27.26.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-14 at 12.27.16.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/14936i918992A787AC60FE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-14 at 12.27.16.png" alt="Screenshot 2019-02-14 at 12.27.16.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Feb 2019 13:11:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-02-18T13:11:12Z</dc:date>
    <item>
      <title>Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253017#M22392</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a custom property group called "Salesforce Information". Within this group I've created a custom property called "web_activity_most_recent__c" and set it to hidden on a form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scenario: Everytime a form is submitted, we need this property to be updated with a value dependent on the page the form is submitted from. We currently have over 120 pages with corrsponsponding&amp;nbsp;web_activity_most_recent__c values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;eg. if the visitor submits a form from huddle.com/get-started/ then the value forweb_activity_most_recent__c&amp;nbsp; should be "Downloaded_ebook_collaboration_client-experience", and a different value if the form is submited from another page, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get it to work...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance will be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Herewith my edited form embed code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!--[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: "my-hubspot-code",
formId: "e7075578-e362-4c94-a075-10fb9c74e8e0",
redirectUrl: "/sites/default/files/white-papers-files/huddle_-_accounting_and_professional_services_e-paper_2018.pdf",
onFormReady($form) {
$('input[name="web_activity_most_recent__c"]').val('Downloaded_ebook_collaboration_client-experience').change();
}
});
&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-14 at 12.26.42.png" style="width: 799px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/14935iC923775C7C86B3BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-14 at 12.26.42.png" alt="Screenshot 2019-02-14 at 12.26.42.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-14 at 12.27.26.png" style="width: 866px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/14934i64D827FE004B260B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-14 at 12.27.26.png" alt="Screenshot 2019-02-14 at 12.27.26.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-14 at 12.27.16.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/14936i918992A787AC60FE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-14 at 12.27.16.png" alt="Screenshot 2019-02-14 at 12.27.16.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 13:11:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253017#M22392</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T13:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253320#M22436</link>
      <description>&lt;P&gt;Hey&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;, if you use this instead it should work:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;onFormReady($form)&lt;/SPAN&gt; {
$('input[name="&lt;SPAN&gt;web_activity_most_recent__c&lt;/SPAN&gt;"]', $form).val('&lt;SPAN&gt;Downloaded_ebook_collaboration_client-experience&lt;/SPAN&gt;').change();
}&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Feb 2019 08:33:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253320#M22436</guid>
      <dc:creator>JasminLin</dc:creator>
      <dc:date>2019-02-15T08:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253328#M22439</link>
      <description>&lt;P&gt;Thanks but that doesn't work either. It's the $ that's the issue. It works perfectly when replacing the $ with the actual word "JQuery".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Final working code as below:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&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;&lt;BR /&gt;&amp;lt;script&amp;gt;
hbspt.forms.create({
&amp;nbsp; portalId: "replace-this-with-your-hubspot-id",
&amp;nbsp; formId: "replace-this-with-hubspot-form-id",
&amp;nbsp; onFormSubmit: function($form) {
&amp;nbsp; &amp;nbsp; jQuery('input[name="replace-this-with-hubspot-internal-name-of-hidden-field"]').val('replace-this-with-your-required-value').change();
&amp;nbsp; }
});
&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also ensure your Salesforce mapping within the Hubspot integration settings is set to "&lt;STRONG&gt;Use most recent value&lt;/STRONG&gt;" to avoid Salesforce from overwriting recent values changes in Hubspot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-18 at 14.43.14.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/15032i0719E638BBDEBFE7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-18 at 14.43.14.png" alt="Screenshot 2019-02-18 at 14.43.14.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 12:50:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253328#M22439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T12:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253374#M22444</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;@Anonymous&lt;/a&gt;.&amp;nbsp;While the approach outlined would work, the properties in the Salesforce Information section are used in mappings. Populating the properties ending in "__c" - custom fields from Salesforce - won't push values to Salesforce from HubSpot. You want to update the HubSpot property mapped to that Salesforce Information property instead in your form.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 13:06:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253374#M22444</guid>
      <dc:creator>bradmin</dc:creator>
      <dc:date>2019-02-15T13:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253680#M22477</link>
      <description>&lt;P&gt;Thanks for this&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4710"&gt;@bradmin&lt;/a&gt;&amp;nbsp;, what do you suggest I do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've gone ahead and updated the Update Rule in the Salesforce mapping section within Hubspot from Use Salesforce value to Use updated value - as per Hubspot documentation. Everything seems to be working fine? Is there something I'm missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-18 at 14.43.14.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/15031i8318FCC0B8388C2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-18 at 14.43.14.png" alt="Screenshot 2019-02-18 at 14.43.14.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 12:43:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253680#M22477</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T12:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253954#M22495</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;,&amp;nbsp;it looks like the API name of the HubSpot-side property matches the Salesforce property. That would work if your custom HubSpot property has that same API name, but that may not be sustainable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mappings allow you to populate the Salesforce side of the mapping, by setting the value in the HubSpot-side property part of the mapping. You'd have CustomHubspotProperty on the left side of the mapping, and Custom_Salesforce_Field__c on the right. After that's established, put CustomHubSpotProperty as your field on the form, and subsequent submissions will pass the desired value to Salesforce in Custom_Salesforce_Field__c.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ambiguous part is that the Salesforce field needs to exist among your HubSpot properties, so it can be included in the mapping. However, if you map the Salesforce field to the Salesforce field, nothing will effectively get synced to Salesforce from HubSpot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 13:14:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253954#M22495</guid>
      <dc:creator>bradmin</dc:creator>
      <dc:date>2019-02-19T13:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253955#M22496</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4710"&gt;@bradmin&lt;/a&gt;&amp;nbsp;thanks for the response, however everything seems to be working and matches up perfectly. Basically we had this working through Marketo for ages, so it's the exact same implementation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The field's value updates whether amended from Salesforce or Hubspot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 13:19:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253955#M22496</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-19T13:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253956#M22497</link>
      <description>&lt;P&gt;Okay, if it's working for you, you're all set. That's a particular config which does have the potential to interfere with results, but if you haven't experienced any issues, disregard what I wrote.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 13:21:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253956#M22497</guid>
      <dc:creator>bradmin</dc:creator>
      <dc:date>2019-02-19T13:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253960#M22498</link>
      <description>&lt;P&gt;Awesome thanks&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4710"&gt;@bradmin&lt;/a&gt;&amp;nbsp;I'll definitely keep an eye out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again, cheers&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 14:09:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/253960#M22498</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-19T14:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/328074#M31724</link>
      <description>&lt;P&gt;Wouldn't it be much safer to just use plain js to do this?&lt;/P&gt;&lt;P&gt;e.g:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&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: "xxxxxxx",
  formId: "xxxxxxx-xxxx-xxxx-xxxxxxxxxxxx",
  onFormReady: function($form){
    valueFrom = document.querySelector('#value-from').innerHTML;
    document.getElementsByName("value_to")[0].value=valueFrom;
  },
});
&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;P&gt;This way you wouldn't be relying on jQuery at all, and it would, in general, be much quicker and more reliable. (No blocking, fires as soon as form loaded)&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 08:47:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/328074#M31724</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2020-03-27T08:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421909#M41871</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/16537"&gt;@dannio&lt;/a&gt;&amp;nbsp;-In your example, where would I place the "internal_property_name" of the field, and where would I place the "value" to go into that field?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 00:20:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421909#M41871</guid>
      <dc:creator>RLightfoot</dc:creator>
      <dc:date>2021-03-25T00:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421918#M41872</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/177303"&gt;@RLightfoot&lt;/a&gt;&amp;nbsp;the&amp;nbsp;&lt;SPAN&gt;internal_property_name is the &lt;STRONG&gt;value_to&lt;/STRONG&gt;, and the value is the &lt;STRONG&gt;valueFrom&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;document.getElementsByName("&lt;SPAN&gt;internal_property_name&lt;/SPAN&gt;")[0].value=valueFrom;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 01:40:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421918#M41872</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2021-03-25T01:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421930#M41875</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/16537"&gt;@dannio&lt;/a&gt;&amp;nbsp;- sorry, novice here...&lt;BR /&gt;is this the syntax?&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;region: "xxx",&lt;BR /&gt;portalId: "xxxxxx",&lt;BR /&gt;formId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"&lt;BR /&gt;onFormReady: function($form){&lt;BR /&gt;valueFrom = document.querySelector('#value-from').innerHTML;&lt;BR /&gt;document.getElementsByName("favorite_character")[0].('Barney Rubble')=valueFrom;&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;</description>
      <pubDate>Thu, 25 Mar 2021 02:59:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421930#M41875</guid>
      <dc:creator>RLightfoot</dc:creator>
      <dc:date>2021-03-25T02:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421934#M41876</link>
      <description>&lt;P&gt;As far as I can tell,&amp;nbsp;&lt;STRONG&gt;region&amp;nbsp;&lt;/STRONG&gt;isn't a param on the embedded code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find out more of the form embedded code here:&lt;/P&gt;
&lt;P&gt;&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;The&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;valueFrom&amp;nbsp;&lt;/STRONG&gt;variable&amp;nbsp;in my example is only an example of where the data could come from. In this case, it's an element with the ID&amp;nbsp;&lt;STRONG&gt;value-from&amp;nbsp;&lt;/STRONG&gt;somewhere on the page.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The assignment should be something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;document.getElementsByName("favorite_character")[0].value='Barney Rubble';&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can check if the value has been set after by opening up the console and typing:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;document.getElementsByName("favorite_character")[0].value &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 03:16:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421934#M41876</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2021-03-25T03:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421935#M41877</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/16537"&gt;@dannio&lt;/a&gt;&amp;nbsp;- Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 03:42:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/421935#M41877</guid>
      <dc:creator>RLightfoot</dc:creator>
      <dc:date>2021-03-25T03:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Update contact property on form submit</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/422854#M42001</link>
      <description>&lt;P&gt;No worries. Another way to make sure it gets the correct element with js is to use the&amp;nbsp;&lt;STRONG&gt;form&lt;/STRONG&gt; value that's defined by the callback like so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;form.elements.favorite_character.value = *insert value*&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Mar 2021 02:26:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Update-contact-property-on-form-submit/m-p/422854#M42001</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2021-03-29T02:26:45Z</dc:date>
    </item>
  </channel>
</rss>

