diff --git a/layouts/joomla/form/field/radio.php b/layouts/joomla/form/field/radio.php index 82f87fdb0c5ad..040a02dd14fe0 100644 --- a/layouts/joomla/form/field/radio.php +++ b/layouts/joomla/form/field/radio.php @@ -64,9 +64,10 @@ $option) : ?> value === $value) ? 'checked="checked"' : ''; - $disabled = !empty($option->disable) ? 'disabled' : ''; - $style = $disabled ? 'style="pointer-events: none"' : ''; + $checked = ((string) $option->value === $value) ? 'checked="checked"' : ''; + $disabled = !empty($option->disable) ? 'disabled' : ''; + $style = $disabled ? 'style="pointer-events: none"' : ''; + $option->class = !empty($option->class) ? $option->class : ''; $option->class = trim($option->class . ' ' . $disabled); $optionClass = !empty($option->class) ? 'class="' . $option->class . '"' : '';