From 506bd66c716b71abbefac121b3d04c8001246d1d Mon Sep 17 00:00:00 2001 From: Ronaldo Richieri Date: Mon, 8 Apr 2024 16:59:19 -0300 Subject: [PATCH] Add callback to EditCustomFieldSelect before rendering values In some cases, we might want to modify or restrict the values that are displayed in the custom field select box. This callback allows us to do that. --- share/html/Elements/EditCustomFieldSelect | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/html/Elements/EditCustomFieldSelect b/share/html/Elements/EditCustomFieldSelect index 005c5c68192..e9bb82d3e80 100644 --- a/share/html/Elements/EditCustomFieldSelect +++ b/share/html/Elements/EditCustomFieldSelect @@ -212,6 +212,8 @@ $MaxValues => 1 % $_ = lc $_ foreach @Default; % my $selected; % my $CFVs = CachedCustomFieldValues($CustomField); +% $m->callback( CallbackPage => '/Elements/EditCustomFieldSelect', CallbackName => 'MassageCustomFieldValues', +% CustomField => $CustomField, CustomFieldValues => $CFVs, ARGSRef => \%ARGS ); % my @levels; % while ( my $value = $CFVs->Next ) { % my $name = $value->Name;