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

  1. Create a new form
  2. Add a new component to the form: Data Privacy (other)
  3. Add a Subscription for checkbox (1)

Drupal

  1. Add a new checkbox field
  2. Setup a handler on a webform
  3. Add a subscription which is 'Conditionally' linked to the new checkbox
  4. Test the form and don't check the checkbox
  5. 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 (true and false) values.
  • Add webform_terms_of_service to the array

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

Issue fork hubspot-3565868

Command icon 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

coretex created an issue. See original summary.

coretex’s picture

Issue summary: View changes
coretex’s picture

Issue summary: View changes

coretex’s picture

Assigned: coretex » Unassigned
Status: Active » Needs review

richgerdes made their first commit to this issue’s fork.

  • richgerdes committed 01676fc5 on 3.x authored by coretex
    Issue #3565868: Update validation for subscriptions en legal consent...
richgerdes’s picture

@coretex,

Thanks for the fix. Nice find here!

richgerdes’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.