RecipeInputFormTrait forces you to check all checkboxes

Created on 26 November 2024, 2 months ago

Problem/Motivation

RecipeInputFormTrait, added by ✨ Add a trait for forms that want to collect input on behalf of a recipe Active , marks all recipe input elements as required when it builds the form. This generally is correct because recipe inputs are never optional. But this is a problem for checkbox elements (single checkboxes, that is, not multi-value checkboxes) because they are always present in the submitted form data, but not required to be checked. The current code makes it impossible to leave a recipe input's checkbox unchecked.

Proposed resolution

Recipe input elements that have #type => checkbox should not get the #required flag by default.

πŸ› Bug report
Status

Active

Version

11.1 πŸ”₯

Component

recipe system

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024