Problem/Motivation
A warning is logged when adding/editing a "hidden" webform element.
Warning: Undefined array key "admin_title" in webform_validation_webform_element_configuration_form_alter() (line 59 of /var/www/html/web/modules/contrib/webform_validation/webform_validation.module)
Steps to reproduce
The relevant code is:
$this_element_title = $customProperties['admin_title'] ?: $customProperties['title'];
However, $customProperties does not have an admin_title key for a hidden element.
Proposed resolution
$this_element_title = !empty($customProperties['admin_title']) ? $customProperties['admin_title'] : $customProperties['title'];
Or, if admin_title should be used if it exists, even if it's an empty string:
$this_element_title = $customProperties['admin_title'] ?? $customProperties['title'];
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #4
solideogloria commentedComment #7
liam morlandComment #9
rudi teschner commentedAdding an advanced html/text element according to https://www.drupal.org/project/webform_validation/issues/3261965 there still is an error:
Warning: Undefined array key "title" in webform_validation_webform_element_configuration_form_alter() (Zeile 59 in /var/www/html/docroot/modules/contrib/webform_validation/webform_validation.module).
Comment #10
liam morlandPlease open a new issue about this.