Allow for non-standard imported values for checkbox fields

Requires Version 1.1

Numbers screenshot showing checkboxes

Normally, the imported value should match the checkbox input's value. If the checkbox in Gravity Forms has a value of "Apple", the imported cell value should also be "Apple". If the CSV value is "Apples" or "True" or "YES" or "1", the import will not check the checkbox in Gravity Forms. 

The  Numbers app for Mac and iOS has checkbox cell formats (see screenshot). When exported to CSV, these checked or unchecked checkboxes are represented by "TRUE" or "FALSE" text values. If you are importing a CSV from Numbers that uses these special fields, then "TRUE" should be considered valid during import.

Allow any non-empty value to be valid

These following values will be interpreted as empty, and the checkbox will not be checked:

"" // Empty
"0" // Zero
"FALSE" // Upper-case "false"

Any other value will be interpreted as not empty, and the checkbox will be checked.

Enable the functionality

Have a column in your file for each checkbox option.

The checkbox options.

Each checkbox value must be mapped separately during the Import Entries configuration.

If the gravityview-importer/strict-mode/fill-checkbox-choices filter returns `true`, the correct value will be filled. See below code: