Skip to content

improved boolean type

JonGold requested to merge JonGold/form-processor:improved-booleans into master

Currently, the "Yes/No" input type can't take the values "Yes" or "No". Or "True", TRUE, "False", or FALSE. It can only take 1 and 0.

This is a drop-in replacement to correct that - any value defined as a valid "Boolean" value in CRM_Utils_Rule::boolean() is accepted now. Because this is a superset of the existing 1/0, it works with existing form processors.

Note: This does not address the issue that arises from passing a boolean FALSE to API3 causing that field to not get updated at all. I'm still not sure how best to tackle that - it's a problem with API3 itself, which unfortunately API3 clients must work around.

Merge request reports