Problem/Motivation

MondayCreateItemWebformHandler::shapeValue() supports text,
email, long_text, phone, status, and
dropdown column types, but has no native handling for Webform checkbox
fields.

When a Webform checkbox is mapped to a Monday text column with type: text,
the value sent is the raw integer (1 for checked, 0 for
unchecked). The Monday cell then reads "1" — not human-readable, awkward to
filter on, and surprising to anyone looking at the board cold.

This is a common need for forms with explicit-agreement checkboxes (privacy policy,
terms-of-service, marketing opt-in) where the CRM record should preserve a readable Yes/No
of the agreement.

Proposed resolution

Add a new checkbox arm to the match in
shapeValue():

'checkbox' => ($value === '1' || $value === 1) ? 'Yes' : 'No',

Update the field-help text in buildConfigurationForm() to list
checkbox alongside the other supported types.

Remaining tasks

  • Add match arm in MondayCreateItemWebformHandler::shapeValue()
  • Update field help text in buildConfigurationForm() (lists supported
    types)
  • Unit/kernel test coverage for the new type (both checked and unchecked)
  • Update README.md examples to mention checkbox

User interface changes

The "Drupal field → Monday column mapping (YAML)" help text on the handler config form
gains checkbox in its supported-types list. No visual UI changes
elsewhere.

API changes

  • New supported value for the type: key in
    column_mapping_yaml: checkbox.
  • Renders integer 1 (or string '1') as "Yes";
    any other value as "No".
  • No breaking changes — existing type: text mappings continue to work
    identically.

Data model changes

None.

Release notes snippet

Added 'checkbox' column type to MondayCreateItemWebformHandler. Webform
  checkbox fields can now be mapped with `type: checkbox`, rendering as "Yes" / "No" in
  Monday text columns instead of the raw integer value.
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

das.gautam created an issue. See original summary.

das.gautam’s picture

Status: Active » Fixed

PR merged, closing this ticket.

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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.