May 12, 20224:18 AM - edited May 12, 20224:19 AM
Top Contributor | Platinum Partner
Can't send POST data to hubspot form api using client side
SOLVE
Hello @ablayze_jb . Thanks for writing. Seems like the data you send is malformed, your formStepOne variable should contain a JSON object that has the name and value for the field, where the name is the actual field name and value its value you get from the form. It should look something like the following:
Change or add the following : contentType : 'application/json', dataType : 'json', Also add the headers: {"Content-Type" : "application/json"} setting. Hope this helps, let us know how it went and if you need more help! Also make sure to post the errors if you get any so it helps with debugging.
Cheers!
If my answer was helpful please mark it as a solution.
May 12, 20224:18 AM - edited May 12, 20224:19 AM
Top Contributor | Platinum Partner
Can't send POST data to hubspot form api using client side
SOLVE
Hello @ablayze_jb . Thanks for writing. Seems like the data you send is malformed, your formStepOne variable should contain a JSON object that has the name and value for the field, where the name is the actual field name and value its value you get from the form. It should look something like the following:
Change or add the following : contentType : 'application/json', dataType : 'json', Also add the headers: {"Content-Type" : "application/json"} setting. Hope this helps, let us know how it went and if you need more help! Also make sure to post the errors if you get any so it helps with debugging.
Cheers!
If my answer was helpful please mark it as a solution.