Element's description not being displayed if it is a formatted text and represented as a render element.
includes/webform.theme.inc
$variables['description']['content'] = [
'#type' => 'container',
'#attributes' => new Attribute($description_attributes),
] + $description;
So a container element type is used. And description array is being concatenated with it instead of being inserted as a child. It works when description is a ['#markup' => $element['#description'] array but not when it's a separate render element like this:
Array
(
[#type] => processed_text
[#text] => Voornaam
[#format] => full_html
)
Description array should be inserted as a child of the container array.
Comments
Comment #2
solariel commentedComment #3
solariel commentedComment #4
jrockowitz commented@solariel Thanks for the patch.
The webform element description is pretty a complex render array so I think rendering the description makes things a little simpler and keeps the current output consistent.
Please review the attached patch.
Comment #6
jrockowitz commentedI committed the patch. Please download the latest dev release to review.
Comment #7
solariel commented@jrockowitz
It works. Thank you for quick response!