Events Made Easy Forums Bug fixed or feature request implemented Custom fields – checkbox with multiple field values requires all boxes checked

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #60005
    Anonymous
    Inactive

    Version 2.1.26
    I create a custom field that is a checkbox type, and it has multiple field values (e.g. xxx||yyy||zzz).
    I make the field required, either in the edit field settings, or using the #REQ prefix in a template.
    The field when used in a form then requires that ALL boxes are checked, or gives an error to the form user when they try to submit, indicating the boxes that are not checked must be checked to proceed.

    Issue: common use case for a multiple checkbox field that is “required” is that at least one (or more is OK) boxes must be checked (e.g. “check all that apply” and similar use cases).

    Suggested: “required” on multiple value checkbox field means “at least one box checked” and not “all boxes checked.”

    #60006
    Franky
    Keymaster

    From the point of view of html, all checkboxes stand on their own. So the required attribute is given to each checkbox and so all needs to be checked.
    But this is indeed unwanted, so I changed the code accordingly:
    https://plugins.trac.wordpress.org/changeset/2107679/

    #60007
    Anonymous
    Inactive

    Thanks – I will regress on my use case after next upgrade.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top