When conditionally marking a field as required, the validation message throws a "Unknown index !name" warning. The message itself is set to output the machine name, rather than the label.

Also changed the error to be set on the field so it is marked as having an error. This way themes can provide adequate styling.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zerolab created an issue. See original summary.

zerolab’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.27 KB

The attached patch fixes the PHP warning and tweaks the message to try to get the field label, falling back to its machine name.

sergiogsanchez’s picture

Basis on zerolab patch we should need update the name tokens, this patch will work with current dev version.

  • OlgaRabodzei committed 6f9f4ea on 8.x-1.x authored by zerolab
    Issue #2833368 by zerolab, sergiogsanchez: Fix conditionally required...

Status: Needs review » Needs work

The last submitted patch, 3: fix_required_field_labels.patch, failed testing.

OlgaRabodzei’s picture

Status: Needs work » Fixed

Was fixed in the last release(2017-Apr-07). Can someone check it, please?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.