Skip to content

Cannot map "0" to a numeric or text field in a Civi form #3

@nc3man

Description

@nc3man

When the number 0 (or text "0") is entered in a Caldera form, either directly in an input box, or as a value from a radio selection, 0 appears to get replaced by "null" at some point prior to running a CiviCRM Form Processor which needs this parameter. If this is an expected parameter on the Civi form processor, you get a FAIL when submitted.

I discovered this on a more complicated form, but I created a super simple example to illustrate the error. The Caldera form is named test_input_zero and is exported as test_input_zero-export.json. The Civi Form Processor that is used as a processor in test_input_zero is test_num_civi and is exported as test_num_civi.json. I zipped both exports to attach here
test_input_zero.zip. I'm also attaching a screenshot of the McRestFace Log after entering a "1" for the numeric field in test_input_zero. It is correctly passed through as input to test_num_civi processor in CiviCRM.
cf_interface_enter_1

Entering the number 0 shows that null is passed to test_num_civi and so the processor fails as also shown in the McRestFaceLog
cf_interface_enter_0

There is no issue with any other non-zero integer, including negative numbers, being passed through the interface. 0 just is interpreted as null for some reason. Is there a setting to prevent this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions