form embed code value update onFormReady not working
SOLVE
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
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 onFormSubmit but that just submitted a blank form. Maybe something has changed?
form embed code value update onFormReady not working
SOLVE
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.
form embed code value update onFormReady not working
SOLVE
Thanks for your post and it's great you got this to work.
I'm having an identical issue but turning onUnstyled form 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.
When I use $('input[name="firstname"]').val("Brian").change(); I get an error TypeError: $ is not a function. 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.
form embed code value update onFormReady not working
SOLVE
I tested out the code you added, but unfortunaly I get an error when using jquery 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?
form embed code value update onFormReady not working
SOLVE
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.
form embed code value update onFormReady not working
SOLVE
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 🙂
HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates. Learn More.