Skip to content
Snippets Groups Projects

Issue #3388071: Disabled and readonly form element attributes should be boolean HTML5 attributes

Open Issue #3388071: Disabled and readonly form element attributes should be boolean HTML5 attributes

Files

@@ -1209,10 +1209,10 @@ protected function handleInputElement($form_id, &$element, FormStateInterface &$
// JavaScript on document ready.
if (!empty($element['#disabled'])) {
if (!empty($element['#allow_focus'])) {
$element['#attributes']['readonly'] = 'readonly';
$element['#attributes']['readonly'] = TRUE;
}
else {
$element['#attributes']['disabled'] = 'disabled';
$element['#attributes']['disabled'] = TRUE;
}
}
Loading