<?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: jQuery Not Working in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232045#M10941</link>
    <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hubspot.com/u/chris.w_aml"&gt;@chris.w_AML&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;If jQuery is loaded before the HubSpot form, then I would expect that code to work (it works for my own forms). Have you tried&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;$('input[name="firstname"]').val('Jack').change();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;or some of the methods outlined in &lt;A href="https://integrate.hubspot.com/t/hubspot-form-programmatically-set-field-value-via-jquery/2662"&gt;this topic&lt;/A&gt;?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Sep 2018 16:32:28 GMT</pubDate>
    <dc:creator>IsaacTakushi</dc:creator>
    <dc:date>2018-09-11T16:32:28Z</dc:date>
    <item>
      <title>jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232044#M10940</link>
      <description>&lt;P&gt;I have tried everything I can think of but I cannot figure out why I cant modify my forms with jQuery.&lt;/P&gt;
&lt;P&gt;putting:&lt;/P&gt;
&lt;P&gt;jQuery('input[name="firstname"]').val('Brian').change();&lt;/P&gt;
&lt;P&gt;into the browser console yields nothing.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 21:56:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232044#M10940</guid>
      <dc:creator>Chris_w</dc:creator>
      <dc:date>2018-09-10T21:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232045#M10941</link>
      <description>&lt;P&gt;Hi &lt;A class="mention" href="https://community.hubspot.com/u/chris.w_aml"&gt;@chris.w_AML&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;If jQuery is loaded before the HubSpot form, then I would expect that code to work (it works for my own forms). Have you tried&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;$('input[name="firstname"]').val('Jack').change();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;or some of the methods outlined in &lt;A href="https://integrate.hubspot.com/t/hubspot-form-programmatically-set-field-value-via-jquery/2662"&gt;this topic&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 16:32:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232045#M10941</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-09-11T16:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232046#M10942</link>
      <description>&lt;P&gt;Here is a picture of what I get when I put that query into the console. I am using wordpress as well if there are any known issues with that. I've tried putting this same query into my .js file too and nothing happens.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;A class="lightbox" href="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/6/6f197029c725c5d6e3a9a907d132e4a6f949bd8f.png" data-download-href="/legacyfs/online/uploads/default/6f197029c725c5d6e3a9a907d132e4a6f949bd8f" title="2018-09-11 09_48_06-Copy of_ Contact Us (dummy page to design and test hubspot) - AML Oceanographic .png" rel="nofollow noopener"&gt;&lt;IMG src="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/6/6f197029c725c5d6e3a9a907d132e4a6f949bd8f.png" alt="2018-09-11%2009_48_06-Copy%20of_%20Contact%20Us%20(dummy%20page%20to%20design%20and%20test%20hubspot)%20-%20AML%20Oceanographic%20" width="690" height="76" /&gt;&lt;DIV class="meta"&gt;
&lt;SPAN class="filename"&gt;2018-09-11 09_48_06-Copy of_ Contact Us (dummy page to design and test hubspot) - AML Oceanographic .png&lt;/SPAN&gt;&lt;SPAN class="informations"&gt;1051x116 7.78 KB&lt;/SPAN&gt;&lt;SPAN class="expand"&gt;&lt;/SPAN&gt;
&lt;/DIV&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 16:52:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232046#M10942</guid>
      <dc:creator>Chris_w</dc:creator>
      <dc:date>2018-09-11T16:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232047#M10943</link>
      <description>&lt;P&gt;Hey &lt;A class="mention" href="https://community.hubspot.com/u/chris.w_aml"&gt;@chris.w_AML&lt;/A&gt;&lt;BR /&gt;
I took a peek at your development project via the URL in your console image.&lt;/P&gt;
&lt;P&gt;You are loading a few Hubspot forms on the same page, while this is not a problem in itself you might want to rework how you are doing so in the code. Are you trying to change the Name input for all forms, or a specific form? If a specific form, I'd suggest using the &lt;SPAN class="hashtag"&gt;#ID&lt;/SPAN&gt; of the input instead.&lt;/P&gt;
&lt;P&gt;I found the test where you are attempting to change your name input:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;&amp;lt;script&amp;gt;
  hbspt.forms.create({
	portalId: "3930388",
	formId: "305ce453-e0f3-4923-9877-cd6a7a6def9c"
    window.onload = function() {
   jQuery('input[name="firstname"]').val('Brian').change();
   alert('test');
     
}  
});
&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is currently returning an error, Instead you should use the onFormReady callback that Hubspot&lt;BR /&gt;
provides. This will ensure that your .change event fires after the form has loaded.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;hbspt.forms.create({
      portalId: '',
      formId: '',
       onFormReady: function($form) {
           jQuery('input[name="firstname"]').val('Brian').change();
        } 
});        
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now, if this code returns an error there is an issue with the way Jquery is being loaded, I didn't have a chance to dig deeper, but I hope this steers you in the right direction.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 20:23:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232047#M10943</guid>
      <dc:creator>Christopher_G</dc:creator>
      <dc:date>2018-09-13T20:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232048#M10944</link>
      <description>&lt;ASIDE class="quote no-group" data-post="4" data-topic="12336"&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/c/ba9def/40.png" class="avatar" /&gt; Christopher_G:&lt;/DIV&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;onFormReady: function($form) { jQuery('input[name="firstname"]').val('Brian').change(); }&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/ASIDE&gt;
&lt;P&gt;Thank you for your response, I had all of the forms on a dummy page for testing purposes. I have removed all but one and used the onFormReady in the form creation code but when I try that It disappears.&lt;/P&gt;
&lt;P&gt;Just in case, here is the embeded form:&lt;BR /&gt;
script charset="utf-8" type="text/javascript" src="&lt;A href="https://js.hsforms.net/forms/shell.js" rel="nofollow noopener"&gt;//js.hsforms.net/forms/shell.js&lt;/A&gt;"&amp;gt;/script&amp;gt;&lt;BR /&gt;
script&amp;gt;&lt;BR /&gt;
hbspt.forms.create({&lt;BR /&gt;
portalId: "3930388",&lt;BR /&gt;
formId: "305ce453-e0f3-4923-9877-cd6a7a6def9c"&lt;BR /&gt;
onFormReady: function($form) {&lt;BR /&gt;
jQuery('input[name="firstname"]').val('Brian').change();&lt;BR /&gt;
}&lt;BR /&gt;
});&lt;/P&gt;
&lt;P&gt;/script&amp;gt;&lt;/P&gt;
&lt;P&gt;Without and custom javascript, the forms work perfectly, which leads me to believe it's probably an issue with our jQuery. I just took this wordpress website over from someone else and the Javascript is a bit of a mess. Do you have any idea how to fix this or can to point me towards some articles/forums that might help?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 20:41:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232048#M10944</guid>
      <dc:creator>Chris_w</dc:creator>
      <dc:date>2018-09-13T20:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232049#M10945</link>
      <description>&lt;P&gt;Hey &lt;A class="mention" href="https://community.hubspot.com/u/chris.w_aml"&gt;@chris.w_AML&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;It seems that you have a Marketing Hub Starter subscription. Like collected forms and lead flows, these embed codes cannot be modified. This is outlined at the top of &lt;A href="https://developers.hubspot.com/docs/methods/forms/advanced_form_options" rel="nofollow noopener"&gt;this documentation&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Note: These options are only available for forms created using the marketing form builder available with a paid Basic, Professional, or Enterprise marketing subscription. Other forms, such as collected forms or lead flows, do not support these customization options.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Apologies for the inconvenience and missing this detail earlier.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 21:08:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232049#M10945</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-09-13T21:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232050#M10946</link>
      <description>&lt;P&gt;Apologies, I’m missing a comma after the formid variable. Please update that and try again.&lt;/P&gt;
&lt;P&gt;I can take another look when I get to my desk as well.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 22:55:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232050#M10946</guid>
      <dc:creator>Christopher_G</dc:creator>
      <dc:date>2018-09-13T22:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232051#M10947</link>
      <description>&lt;P&gt;Can I Alter css or upload directly to the API with the starter version?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 23:23:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232051#M10947</guid>
      <dc:creator>Chris_w</dc:creator>
      <dc:date>2018-09-13T23:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232052#M10948</link>
      <description>&lt;P&gt;Thank you for your help but I just found out you can even alter forms with JQ if you have the starter version &lt;IMG src="https://community.hubspot.com/legacyfs/online/emojis/twitter/confused.png?v=6" title=":confused:" class="emoji" alt=":confused:" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 23:25:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232052#M10948</guid>
      <dc:creator>Chris_w</dc:creator>
      <dc:date>2018-09-13T23:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232053#M10949</link>
      <description>&lt;P&gt;Oh yes, sorry I didn't see &lt;A class="mention" href="https://community.hubspot.com/u/Isaac_Takushi"&gt;@Isaac_Takushi&lt;/A&gt; 's reply while on the road.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 02:32:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232053#M10949</guid>
      <dc:creator>Christopher_G</dc:creator>
      <dc:date>2018-09-14T02:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: jQuery Not Working</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232054#M10950</link>
      <description>&lt;P&gt;jQuery('input[name="firstname"]').change(function(){&lt;/P&gt;
&lt;P&gt;if(jQuery(this).val() == 'Brian'){&lt;BR /&gt;
code&lt;BR /&gt;
}else{&lt;BR /&gt;
code&lt;BR /&gt;
}&lt;BR /&gt;
});&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 13:32:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/jQuery-Not-Working/m-p/232054#M10950</guid>
      <dc:creator>Gurutechnolabs</dc:creator>
      <dc:date>2018-09-26T13:32:44Z</dc:date>
    </item>
  </channel>
</rss>

