Embedded form clears prepopulated fields on focus/submit


I’m working on embedding a form. Embedding itself works fine and form submits without a hitch. What I’m having an issue with is prepopulating some of the fields.

Per tutorial, I set a fields value with either of:

  1. $(‘input[name=“phone”]’).val(‘123321’).change();
  2. $(‘input[type=“email”]’).prop(‘value’, "mail@mail.com").change();

Values appear fine on form load but when such field get a focus or form is submitted those these prepopulatted values get cleared. Manually entered values are working as expected.

I’ve tried setting value several times in a row, focus’ing and blur’ing input before that to mimic user interaction, adding timeout to delay value assign and finally making an empty barebons html page with only required js to exclude any potential conflicts. No luck.


@Igor Same here. The hubspot support really need to improve on the documentation. This one is not working at all: http://developers.hubspot.com/manipulating-forms-with-jquery.

I am trying to set intervals so that the value remains. But I am looking for a simpler approach.


Hello, I am in the same situation since last Friday.

I have already written a topic about this, where I propose a temporary solution.

Let me know if you guys find a better and cleaner fix.