Send JSON via HubSpot's form


I’ve created a form in HubSpot with some fields like Name, E-mail and of course Submit button. I would like transfer some data (which is actually a JSON object) and send it via form but JSON is independent element beyond form but is dynamic. Actually is a score from SurveyJS.


Hi @Alexios,

The forms API doesn’t accept JSON; if the JSON represents contact info (where fields correspond to contact properties) then you’ll need to parse it out into form fields. If you just need to store the raw JSON for a submission on a contact record, you could theoretically submit it to a custom multi-line text property.


I’ve done it. I used:
onFormSubmit: function($form) { $(“input”).val(something); }

and hidden form input in order to add a data to its value via jQuery.

Thank you for answer.