diff --git a/templates/element/genericElements/Form/Fields/genericField.php b/templates/element/genericElements/Form/Fields/genericField.php index 38f05a4..4174c5b 100644 --- a/templates/element/genericElements/Form/Fields/genericField.php +++ b/templates/element/genericElements/Form/Fields/genericField.php @@ -1,5 +1,7 @@ FormFieldMassage->prepareFormElement($this->Form, $params, $fieldData); ?> diff --git a/templates/element/genericElements/Form/fieldScaffold.php b/templates/element/genericElements/Form/fieldScaffold.php index 818e6e6..32b339b 100644 --- a/templates/element/genericElements/Form/fieldScaffold.php +++ b/templates/element/genericElements/Form/fieldScaffold.php @@ -32,7 +32,7 @@ } else { $params['class'] = ''; } - if (empty($fieldData['type']) || $fieldData['type'] !== 'checkbox' ) { + if (empty($fieldData['type']) || ($fieldData['type'] !== 'checkbox' && $fieldData['type'] !== 'radio')) { $params['class'] .= ' form-control'; } foreach ($fieldData as $k => $fd) { diff --git a/templates/element/genericElements/Form/genericForm.php b/templates/element/genericElements/Form/genericForm.php index ba4146e..446cc48 100644 --- a/templates/element/genericElements/Form/genericForm.php +++ b/templates/element/genericElements/Form/genericForm.php @@ -20,7 +20,7 @@ $entity = isset($entity) ? $entity : null; $fieldsString = ''; $simpleFieldWhitelist = [ - 'default', 'type', 'placeholder', 'label', 'empty', 'rows', 'div', 'required', 'templates' + 'default', 'type', 'placeholder', 'label', 'empty', 'rows', 'div', 'required', 'templates', 'options', 'value', 'checked' ]; if (empty($data['url'])) { $data['url'] = ["controller" => $this->request->getParam('controller'), "action" => $this->request->getParam('url')]; @@ -37,6 +37,8 @@ 'select' => '', 'checkbox' => '', 'checkboxFormGroup' => '{{label}}', + 'radio' => '', + 'radioWrapper' => '{{label}}', 'formGroup' => '