Hi,
I have seen similar posts about this issue but none had a solution. namely: Embedded form clears prepopulated fields on focus/submit
I am here hoping to find a solution since there has been no activity since 2019.
I have a hubspot form that I am using to create support tickets. I am trying to prefill the form with known user information (since they are logged in). I have followed the documentation and have the following.
I am using the onFormReady event that is fired when the form is loaded.
onFormReady: (form) => {
var jForm = $(form);
var email = jForm.find("input[name$='email']")
.val("test@gmail.com).change();
}
This works initially and the field is prefilled. However, as soon as I press submit the field is erased and I get an error saying that an email is required.
I have tried many different options and can’t seem to find any that work. Can someone please help?
Thanks.