OR or NOT value input not working on list field displayed as checkboxes

Created on 14 April 2021, almost 4 years ago
Updated 8 January 2024, about 1 year ago

Problem/Motivation

It triggers a notice (Notice: Undefined index) and then the condition does not work.
That's because checkBoxesHandler::OptionsButtons() assumes that $field[ $value ] exists, but in this case when are on the individual checkbox input, not the checkbox group.

Steps to reproduce

  1. Create a required list field.
  2. Configure the form mode to display it as checkboxes.
  3. Add a NOT or OR condition using this field as the control field.

Proposed resolution

It should try to use $field['#return_value'] (similar to what is done when value is set from the widget).

Remaining tasks

I will submit a patch.

🐛 Bug report
Status

Closed: cannot reproduce

Version

4.0

Component

Code

Created by

🇫🇷France prudloff Lille

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024