Skip to content

CP-14765 - Fix checkbox default values and deleted-option conditions - #81

Merged
bernardodsanderson merged 1 commit into
mainfrom
CP-14765
Jul 30, 2026
Merged

CP-14765 - Fix checkbox default values and deleted-option conditions#81
bernardodsanderson merged 1 commit into
mainfrom
CP-14765

Conversation

@bernardodsanderson

Copy link
Copy Markdown
Collaborator

CP-14765

What

Checkbox fields with a default value now save a true/false value instead of the text "true"/"false" when a form is completed. Conditional fields that depend on a checkbox now show and hide correctly, and conditions pointing at an option that was deleted from the template no longer crash form completion.

Why

Checkbox defaults were stored as plain text, so a checkbox defaulted to "false" was treated as checked by conditional logic — fields tied to it appeared or disappeared backwards. Found while reviewing CP-14012.

How to test

Create a template with a checkbox that has default value "false" plus a field shown only when that checkbox is checked. Complete a submission: the checkbox value should be stored as false and the conditional field should stay hidden. Then delete an option from a multiple-choice field that another field's condition references and complete again — no error.

What
Checkbox fields with a default value now save a true/false value instead of the text "true"/"false" when a form is completed. Conditional fields that depend on a checkbox now show and hide correctly, and conditions pointing at an option that was deleted from the
template no longer crash form completion.

Why
Checkbox defaults were stored as plain text, so a checkbox defaulted to "false" was treated as checked by conditional logic — fields tied to it appeared or disappeared backwards. Found while reviewing CP-14012.

How to test
Create a template with a checkbox that has default value "false" plus a field shown only when that checkbox is checked. Complete a submission: the checkbox value should be stored as false and the conditional field should stay hidden. Then delete an option from a
multiple-choice field that another field's condition references and complete again — no error.
@bernardodsanderson
bernardodsanderson merged commit cf5ade1 into main Jul 30, 2026
5 checks passed
@bernardodsanderson
bernardodsanderson deleted the CP-14765 branch July 30, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants