Required validation is not working with checkboxes widget fields.

Created on 7 May 2025, 3 months ago

Problem/Motivation

  • Checkbox widget field dependencies are not triggered in the required validation check (evaluateDependencies()).
  • Sometimes $values is 0 for checkbox fields on validation ($evaluated_dependees)

Steps to reproduce

  1. Create a visible form level dependency for the required field (target field), and select a checkbox field as the control field.
  2. Set a condition like the screenshot attached.
  3. now show/hide will work, required state will not work

Proposed resolution

Added a new condition for checkbox fields in evaluateDependencies()
src/ConditionalFieldsFormHelper.php

Remaining tasks

If needed implement the same for other field widgets.

🐛 Bug report
Status

Needs work

Version

4.0

Component

Code

Created by

🇮🇳India maniesraj

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

Comments & Activities

Production build 0.71.5 2024