diff --git a/layouts/joomla/form/field/email.php b/layouts/joomla/form/field/email.php index 3ee9827cc0ae3..96327272a2948 100644 --- a/layouts/joomla/form/field/email.php +++ b/layouts/joomla/form/field/email.php @@ -51,15 +51,15 @@ $attributes = array( $spellcheck ? '' : 'spellcheck="false"', !empty($size) ? 'size="' . $size . '"' : '', - $disabled ? 'disabled' : '', - $readonly ? 'readonly' : '', + $disabled ? 'disabled="disabled"' : '', + $readonly ? 'readonly="readonly"' : '', $onchange ? 'onchange="' . $onchange . '"' : '', $autocomplete, $multiple ? 'multiple' : '', !empty($maxLength) ? 'maxlength="' . $maxLength . '"' : '', strlen($hint) ? 'placeholder="' . $hint . '"' : '', - $required ? 'required aria-required="true"' : '', - $autofocus ? 'autofocus' : '', + $required ? 'required="required" aria-required="true"' : '', + $autofocus ? 'autofocus="autofocus"' : '', ); // Including fallback code for HTML5 non supported browsers. diff --git a/layouts/joomla/form/field/text.php b/layouts/joomla/form/field/text.php index 0731041b229e1..d581bc0879b80 100644 --- a/layouts/joomla/form/field/text.php +++ b/layouts/joomla/form/field/text.php @@ -61,15 +61,15 @@ $attributes = array( !empty($class) ? 'class="' . $class . '"' : '', !empty($size) ? 'size="' . $size . '"' : '', - $disabled ? 'disabled' : '', - $readonly ? 'readonly' : '', + $disabled ? 'disabled="disabled"' : '', + $readonly ? 'readonly="readonly"' : '', $list, strlen($hint) ? 'placeholder="' . $hint . '"' : '', $onchange ? ' onchange="' . $onchange . '"' : '', !empty($maxLength) ? $maxLength : '', - $required ? 'required aria-required="true"' : '', + $required ? 'required="required" aria-required="true"' : '', $autocomplete, - $autofocus ? ' autofocus' : '', + $autofocus ? ' autofocus="autofocus"' : '', $spellcheck ? '' : 'spellcheck="false"', !empty($inputmode) ? 'inputmode="' . $inputmode . '"' : '', !empty($pattern) ? 'pattern="' . $pattern . '"' : '', diff --git a/libraries/joomla/form/fields/text.php b/libraries/joomla/form/fields/text.php index 1f0026cac8496..541d17ff212d9 100644 --- a/libraries/joomla/form/fields/text.php +++ b/libraries/joomla/form/fields/text.php @@ -184,19 +184,22 @@ protected function getOptions() { $options = array(); - foreach ($this->element->children() as $option) + if (isset($this->element)) { - // Only add