I am submitting a form via the API, but when I submit the data, the form fields are no longer linking up. After April 2nd (this could not mean a thing, but the date I noticed of last successful post), I am getting a new response in the "view submission" area of the form.
Here is my API response.
I am using node.js & axios as the http client.
Here is a response in prod where I am also adding the required hs_context values.
{"firstName":"dev","lastName":"","email":"dev-test-email@dev-test.com","company":"","state":"","city":"","phone":"","inquiry":"Hi! My company or team would love some help moving to the cloud!","hsContext":{"hutk":"42b9...187939e","pageName":"page title","pageUrl":"https://domain.com/"},"env":"production"}
This issue happened when we deployed it out, with the Hubspot tracking cookie enabled, as the cookie is only added on production. The issue I saw was that the tracking cookie was also submitting the form, which had a value of "SCRAPED". I have since went into the form and disabled Cookie tracking but turning this on/off doesn't have any change besides duplicate submitting of the form. I am not sure why the field values are not being linked anymore.
Any help or paths that I am missing would be extremely grateful.
@spaceshade - The HubSpot Forms API is expecting a URL encoded body, not JSON. I'd recommend checking if axios has a way to pass this url encoded data
You can see this expectation in the docs: https://developers.hubspot.com/docs/methods/forms/submit_form - an example body is: firstname=TestContact&lastname=FormSub&email=formsub@hubspot.com&newcustomproperty=testing&hs_context=%7B%22hutk%22%3A%2260c2ccdfe4892f0fa0593940b12c11aa%22%2C%22ipAddress%22%3A%22192.168.1.12%22%2C%22pageUrl%22%3A%22http%3A%2F%2Fdemo.hubapi.com%2Fcontact%2F%22%2C%22pageName%22%3A%22Contact%2BUs%22%2C%22redirectUrl%22%3A%22http%3A%2F%2Fdemo.hubapi.com%2Fthank-you%2F%22%7D