Setting required on radios marks all options required

Created on 24 May 2016, over 8 years ago
Updated 8 June 2024, 5 months ago

Adding the required state to radios, adds the required marker to all available options.

$form['field_options']['#states']['required'] = array(
  ':input[name="field_required[und]"]' => array('value' => 1)
);


πŸ› Bug report
Status

Closed: cannot reproduce

Version

10.1 ✨

Component
FormΒ  β†’

Last updated 2 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom r-mo

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

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