<?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: form embed code value update onFormReady not working in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/285030#M26327</link>
    <description>&lt;P&gt;I tested out the code you added, but unfortunaly I get an error when using&amp;nbsp;&lt;EM&gt;jquery &lt;/EM&gt;instead of $. Ive never come accross the error using $ so im not sure how to tell you how to get around it. Are you loading the form on a hubspot page, or an external site? I was just building it on a hubspot page, which already has jquery added. So if you are building it on a separate site maybe there is an issue with the way jquery is loading?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2019 12:59:15 GMT</pubDate>
    <dc:creator>Manobyte</dc:creator>
    <dc:date>2019-08-08T12:59:15Z</dc:date>
    <item>
      <title>form embed code value update onFormReady not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/271091#M24519</link>
      <description>&lt;P&gt;So I have a form that I am creating with the embed code. When the form is created I need it to be created with a value already in it. I have done this in that past and not had any probles, so im not sure what is different or if I have a typo somewhere or something. So here is my code&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;hbspt.forms.create({&lt;BR /&gt;portalId: "XXXXXX",&lt;BR /&gt;formId: "XXX-XXX-XXX-XXX-XXX",&lt;BR /&gt;target: '.firstform',&lt;BR /&gt;onFormReady: function($form) {&lt;BR /&gt;$('input[name="firstname"]').val('Brian').change();&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;this creates the form but does not update the first name field with the value indicated, though I am sure I have used this method in the past. I also tryed using &lt;EM&gt;onFormSubmit&lt;/EM&gt;&amp;nbsp; but that just submitted a blank form. Maybe something has changed?&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 20:28:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/271091#M24519</guid>
      <dc:creator>Manobyte</dc:creator>
      <dc:date>2019-05-20T20:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: form embed code value update onFormReady not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/271097#M24520</link>
      <description>&lt;P&gt;Ok, so I may have posted pre-emtivly since I figureed out how to make this work. All I needed to do was turn on "unstyled form" in the forms options. and now it works.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 20:33:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/271097#M24520</guid>
      <dc:creator>Manobyte</dc:creator>
      <dc:date>2019-05-20T20:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: form embed code value update onFormReady not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/271366#M24556</link>
      <description>&lt;P&gt;Thanks for sharing your solution&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/18498"&gt;@Manobyte&lt;/a&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 20:02:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/271366#M24556</guid>
      <dc:creator>jennysowyrda</dc:creator>
      <dc:date>2019-05-21T20:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: form embed code value update onFormReady not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/284995#M26321</link>
      <description>&lt;P&gt;Thanks for your post and it's great you got this to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having an identical issue but&amp;nbsp;&lt;EM&gt;turning on&lt;/EM&gt;&amp;nbsp;&lt;STRONG&gt;Unstyled form&lt;/STRONG&gt;&amp;nbsp;did not help. Could you recommend something else for me to try? Thanks in advance for your time and any help you could offer with this request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's my embed code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;!--[if lte IE 8]&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&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;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;![endif]--&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&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;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;script&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;hbspt.forms.create({&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;portalId: "XXXXX",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;formId: "XXXXX",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;onFormReady: function($form, ctx) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;jquery('input[name="firstname"]').val("Brian").change();&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;});&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;lt;/script&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;$&lt;/STRONG&gt;('input[name="firstname"]').val("Brian").change();&amp;nbsp;&lt;/EM&gt;I get an error&amp;nbsp;&lt;EM&gt;TypeError: $ is not a function&lt;/EM&gt;. So I replaced $ with jquery and that does not throw an error. This practice was recommended a few places as well. Maybe if you found a way around this error you could share it and that might resolve the issue for me.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 10:15:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/284995#M26321</guid>
      <dc:creator>dranreb</dc:creator>
      <dc:date>2019-08-08T10:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: form embed code value update onFormReady not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/285030#M26327</link>
      <description>&lt;P&gt;I tested out the code you added, but unfortunaly I get an error when using&amp;nbsp;&lt;EM&gt;jquery &lt;/EM&gt;instead of $. Ive never come accross the error using $ so im not sure how to tell you how to get around it. Are you loading the form on a hubspot page, or an external site? I was just building it on a hubspot page, which already has jquery added. So if you are building it on a separate site maybe there is an issue with the way jquery is loading?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 12:59:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/285030#M26327</guid>
      <dc:creator>Manobyte</dc:creator>
      <dc:date>2019-08-08T12:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: form embed code value update onFormReady not working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/392743#M38796</link>
      <description>&lt;P&gt;Kudos to Manobyte for the shared solution. Been scratching my head for hours on this! It was the hint I needed to realise that JS and iframes don't play nicely &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 17:02:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/form-embed-code-value-update-onFormReady-not-working/m-p/392743#M38796</guid>
      <dc:creator>Stevie-Kv</dc:creator>
      <dc:date>2020-12-10T17:02:34Z</dc:date>
    </item>
  </channel>
</rss>

