Problem/Motivation
Legal consent and subscription fields that are conditionally mapped to a Webform checkbox are not being processed in HubSpot.
The legal consent and subscription logic introduced in #3229134: Add support for legalConsentOptions checks if the value == 1. However the changes in #3212295: Webform to HubSpot Checkbox mapping does not work updated checkbox values to return strings true and false.
Also the legal consent and subscription logic is for the checkbox and webform_terms_of_service field. The true and false update is only for the checkbox.
Steps to reproduce
HubSpot
- Create a new form
- Add a new component to the form: Data Privacy (other)
- Add a Subscription for checkbox (1)
Drupal
- Add a new checkbox field
- Setup a handler on a webform
- Add a subscription which is 'Conditionally' linked to the new checkbox
- Test the form and don't check the checkbox
- View the submission or contact to review the subscription: the subscriptions are not added
Proposed resolution
- The check should be updated to support the new string (
trueandfalse) values. - Add
webform_terms_of_serviceto the array
Remaining tasks
-
User interface changes
-
API changes
-
Data model changes
-
Issue fork hubspot-3565868
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
coretex commentedComment #3
coretex commentedComment #5
coretex commentedComment #8
richgerdes@coretex,
Thanks for the fix. Nice find here!
Comment #9
richgerdes