Better field descriptions are working on assorted text field types, but are not overriding those on image upload fields.

Comments

dysproseum created an issue. See original summary.

dysproseum’s picture

StatusFileSize
new609 bytes

Looked into the matching going on in better_field_descriptions_field_widget_form_alter and saw that the labels and descriptions are added as expected when they're set directly on the $element and not its prefix or suffix.

Added an element type check to set these properties explicitly.

dysproseum’s picture

StatusFileSize
new2.16 KB

Created a new "position" setting called "Override" that will handle replacing the label and descriptions for all field types, without the need to render the output to append beneath the field.

yogeshmpawar’s picture

Assigned: dysproseum » yogeshmpawar
yogeshmpawar’s picture

Assigned: yogeshmpawar » Unassigned
StatusFileSize
new1.17 KB

Created a new patch which solves this issue. For image fields '#prefix' & '#suffix' will not work so for these we have to use '#field_prefix' & '#field_suffix' instead of this for more information please refer this link.

  • Yogesh Pawar committed 1f53bc5 on 8.x-1.x
    Issue #2953817 by dysproseum, Yogesh Pawar: Description and label not...
yogeshmpawar’s picture

Status: Active » Fixed

Committed & Pushed to 8.x-1.x branch.
I have manually tested this patch & working as expected, solves the issue with the image field.

Status: Fixed » Closed (fixed)

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