FormBuilder: Add 'is empty' filter
Overview
In FormBuilder, add Is Empty
/ Is Not Empty
for filter fields.
Booleans can be represented as Yes/No radios. This would let other fields be represented in the same way based on whether they are empty or not.
Example use-case
- On the current Contribution Search form there is a 'Contribution is Recurring?' Yes/No which is based on whether the
recur_id
is empty or not.
Current behaviour
FormBuilder can add a filter for a specific value of recur_id but not 'is empty'/'is not empty'
Proposed behaviour
Allow 'is empty'/'is not empty' to be used with any filter field and be configured as booleans.
Comments
General 'is empty'/'is not empty' is available in Apiv4 'where' clauses and SearchKit, so this is about extending to FormBuilder.
See https://chat.civicrm.org/civicrm/pl/js843u3qz3f6pgc8ay183bhuzo