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.mdexamples to mentioncheckbox
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: textmappings 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.
Issue fork monday_crm_integration-3606537
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 #3
das.gautam commentedPR merged, closing this ticket.