Default value for description_display no longer working

Created on 9 August 2023, about 1 year ago
Updated 11 August 2023, about 1 year ago

Problem/Motivation

In the admin/webform/config/elements section, the default description_display value is configured as "Before." However, there seems to be an issue where the description is not displaying correctly within the webform unless the "Before" option is manually selected for the descripton_display at the specific element.

I attempted to address this problem by setting the value to "before" in a custom module using the following code:

    $form_state->set(['default_properties', 'description_display'], 'before');
    $form_state->set(['element_properties', 'description_display'], 'before');

Unfortunately, despite using this code, the description_display value remains empty when inspected using dpm($form_state); until the "Before" option is explicitly chosen from the dropdown menu associated with the element. If "default" is selected, the description will still appear after the field.

Could the observed issue be potentially linked to a recent change in the Drupal core code, as indicated by this modification:
https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/lib/Drupal/C...
is there a possibility that this alteration might be impacting the expected behavior within the Webform module?

πŸ› Bug report
Status

Closed: works as designed

Version

6.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany macdev_drupal Wiesbaden

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

Comments & Activities

Production build 0.71.5 2024