Hubspot form: programmatically set field value via jQuery


How do we do this with vanilla JS (no JQuery)? Or can someone link me to the answer if it’s already been given elsewhere?


Hi guys and gals,

I had the same problem and fixed it by using the script in a different scope “jQuery” instead of “$”.


Not working:


I have the same issue, I'm trying to write on an input:
but it doesn't:disappointed_relieved: work.


Hi @Payman_Ferdowsali,

Is the form fully loaded before that script runs? Have you tried replacing $ with jQuery as mentioned above?


I used Document.load method from Javascrip to make sure it is loaded. I also both $ and JQuery. Apparantly the Document is loaded, but doesnt have all HTML5 attributes!