Adding jQuery makes the form diapear

forms

#1

I use the html widget to embed forms on my wordpress website.

here is an example of my code:

script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/shell.js">
script>
hbspt.forms.create({
portalId: "xxxxxxx",
formId: "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
onFormReady($form, ctx){
jQuery('input[name="firstname"]').val('Brian').change();
}
});
/script>

If I remove the onFormReady and jQuery, the form works just fine, but as soon as I try to add custom javascript, the form disappears. Can someone help me troubleshoot this?


Modifying form with jQuery not working(help)
#2

Hi @chris.w_AML, I'll let @Isaac_Takushi take the lead on this one because I see he's been helping you here: jQuery Not Working . I've touched base with Isaac and worked with him directly. He'll explain in more detail on that thread, but it looks like you're on the Marketing Starter plan, in which case manipulating the form embed code isn't supported. I can definitely see how this can be a big roadblock and would suggest you create an idea on our ideas forum to allow for that functionality. Our developers monitor the site very often and many times we implement ideas that have been submitted there:

https://community.hubspot.com/t5/custom/page/page-id/ideaslandingpage


#4