Get the consent fields from getform or similar

forms

#1

Hello,
I am looking at the API docs:
this talks about submitting GDPR-relevant data (eg. consentToProcess) - developers.hubspot com -> docs/methods/forms/submit_form_ajax
This talks about getting the form fields (eg. developers.hubspot com -> docs/methods/forms/v2/get_form)

Where can I do a search via the API to get the consent fields for a given form? I am working on the WordPress-Hubspot tie-in. It reads in form fields to pair fields in WordPress with fields in Hubspot. I cannot find where / how I find the consent field as defined in a given form.

What API call would expose the consent fields? I want to use that call and address this Gravity Forms integration issue - https://wordpress.org/support/topic/consent-fields-not-mapping/ That plugin uses get_form() to map the available fields for a form. It then, uses /submissions/v3/integration/submit/:portalId/:formGuid to submit data from WordPress to Hubspot. It can send consent data, but I cannot find where I can get the map of available data.

Thanks in advance,

Shawn


#5

Hi @dewolfe001,

After testing, I've confirmed that none of the Forms API endpoints return consent fields at this time.

That said, you can set whatever legalConsentOptions values you wish through this endpoint (i.e. you aren't limited by the fields which appear in the form's UI), however it's not currently possible to tell via the API exactly which consent options have been selected in the UI.

Frankly, I'm surprised consent fields aren't included in Forms API responses since GDPR went into effect. I highly recommend posting your request on the HubSpot Community Ideas Forum so that it gains attention. If you do post, please share the link below so that I may upvote it and share it with a few colleagues. I will also pass this use case along internally.