From cc5b9096b4ad9693add8e6200adfddec77e7dbe5 Mon Sep 17 00:00:00 2001 From: sunnavy Date: Thu, 1 Feb 2024 15:20:16 -0500 Subject: [PATCH] Remove the empty option from multiple-value select custom fields For multiple-value selects, unlike vanilla version where we need to keep the empty option so users can easily deselect all real values, current selectpicker version doesn't need this workaround, just like the previous chosen version. --- share/html/Elements/EditCustomFieldSelect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/html/Elements/EditCustomFieldSelect b/share/html/Elements/EditCustomFieldSelect index a6f23854c20..a62a34dda62 100644 --- a/share/html/Elements/EditCustomFieldSelect +++ b/share/html/Elements/EditCustomFieldSelect @@ -175,7 +175,7 @@ my $use_chosen = CachedCustomFieldValues($CustomField)->Count >= 10 ? 1 : 0; $m->callback( CallbackName => 'Chosen', UseChosen => \$use_chosen, CustomField => $CustomField ); # it's weird to see "(no value) X" in the input when selecting multiple values -$show_empty_option = 0 if $use_chosen && $Multiple; +$show_empty_option = 0 if $Multiple; <%ARGS> $Object => undef