cerebrate/templates/element/genericElements/Form/Fields/dropdownField.php

15 lines
613 B
PHP
Raw Normal View History

<?php
$controlParams = [
'options' => $fieldData['options'],
'empty' => $fieldData['empty'] ?? false,
'value' => $fieldData['value'] ?? null,
'multiple' => $fieldData['multiple'] ?? false,
'disabled' => $fieldData['disabled'] ?? false,
2022-01-27 21:09:32 +01:00
'class' => ($fieldData['class'] ?? '') . ' formDropdown form-select',
'default' => ($fieldData['default'] ?? null)
];
if (!empty($fieldData['label'])) {
$controlParams['label'] = $fieldData['label'];
}
echo $this->FormFieldMassage->prepareFormElement($this->Form, $controlParams, $fieldData);