From 92eaa9c2cc13220a6788804bb74f8ab42f5c09d8 Mon Sep 17 00:00:00 2001 From: Luca Benati Date: Sat, 16 Aug 2025 16:46:35 +0200 Subject: [PATCH] Disable allowClear feature --- backend/forms.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backend/forms.md b/backend/forms.md index 80351c7b..a78ad84a 100644 --- a/backend/forms.md +++ b/backend/forms.md @@ -506,6 +506,17 @@ public function getStatusOptions($value, $formData) } ``` +By default the dropdown has a clearing feature when placeholder is set. This can be disabled by setting the `allowClear` option to `false`. + +```yaml +status: + label: Blog Post Status + type: dropdown + allowClear: false +``` + +>**NOTE:** This is useful in case you cast the model field that use ad dropdown with an Enumerator class to avoid `not a valid backing value for enum` + ### Email `email` - renders a single line text box with the type of `email`, triggering an email-specialised keyboard in mobile browsers.