diff --git a/modules/backend/widgets/form/partials/_field_dropdown.php b/modules/backend/widgets/form/partials/_field_dropdown.php
index eecb194ed7..8984319c7f 100644
--- a/modules/backend/widgets/form/partials/_field_dropdown.php
+++ b/modules/backend/widgets/form/partials/_field_dropdown.php
@@ -1,8 +1,5 @@
options();
-$useSearch = $field->getConfig('showSearch', true);
-$emptyOption = $field->getConfig('emptyOption', $field->placeholder);
-$allowCustom = $field->getConfig('allowCustom', false);
?>
@@ -11,30 +8,28 @@
= (isset($fieldOptions[$field->value])) ? e(trans($fieldOptions[$field->value])) : '' ?>
-
-
+getConfig('emptyOption', $field->placeholder);
+ $options = $field->getAttributes(htmlBuild:false);
+ $options['id'] = $field->getId();
+ $options['class'] = 'form-control custom-select';
+ if ($field->getConfig('showSearch', true) === false) {
+ $options['class'] .= ' select-no-search';
+ }
+ if ($field->getConfig('allowCustom', false)) {
+ $options['class'] .= ' select-modifiable';
+ }
+ if ($emptyOption) {
+ $options['emptyOption'] = e(trans($emptyOption));
+ }
+ if ($field->placeholder) {
+ $options['data-placeholder'] = e(trans($field->placeholder));
+ }
+ ?>
+ = Form::select(
+ name: $field->getName(),
+ list: $fieldOptions,
+ selected: $field->value,
+ options: $options
+ ) ?>