Hi to all. I have a problem that I would like to share with you to try to get help to solve it.
I am currently developing the new website for the company I work for and I have made a custom form that works like a “two step” form. To make this customization I connected to the Hubspot API to get the forms data and I store them in a JSON file and make my custom HTML. I am using this method in PHP (CURL), to send the form to my Hubspot portal and I get all the data without any problem except the checkboxes for the privacy consent to process data and the subscription to receive communications. The documentation about the method I used does not explain how to send this fields.
Before writing this post I searched in this forum for information and I found this post where a user shows an approach to achieve this but with C# instead of PHP. I adapted the array structures showed in his example and added with hs_legal_basis to the encoded string I was sending to the endpoint.
The problem is that the field arrives to the endpoint but if I look in the submission received the field appears with a warning sign with this text:
"This value wasn't passed to the contact record. {} isn't one of the the allowed options."
Into the brackets there is the code sended but the field has not been assigned correctly to the contact. I have seen that the method with AJAX support includes this consent fields in the documentation but I would prefer to not change my code to be able to make it work because I have dedicated a lot of time with this PHP method.
I have not found much information about this and this is why I am asking for help. Maybe this method does not support the sending of this type of data?
Thank in you in advance.
