- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hubspot form: programmatically set field value via jQuery
Feb 2, 2017 12:52 PM
Hi Community,
I am trying to programmatically set the value of a form field using jQuery, with the following code:
$(‘input[name=“firstname”]’).val(“damiano”).change();
If I paste this code on Chrome console I see that the field changes, but then it gets updated with an empty value if I click on other fields.
The pages I am testing on are:

Donazione per il dispensario medico in Guatemala | MdB
Aiuta anche tu con un piccolo gesto per raccogliere fondi per il dispensario medico e le attività dell'ambulatorio nel Petén, in Guatemala
Code like the above used to work, as it is documented here http://developers.hubspot.com/manipulating-forms-with-jquery
I have opened a ticket on HS, and support is checking if it is really a bug.
Has someone of you experienced this behavior recently?
Thank you very much in advance of your help.
Damiano
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content