Skip to content

Commit

Permalink
Add callback to EditCustomFieldSelect before rendering values
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
richieri-bps committed Mar 5, 2024
1 parent cf34cad commit 7c21ffa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions share/html/Elements/EditCustomFieldSelect
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ $MaxValues => 1
% $_ = lc $_ foreach @Default;
% my $selected;
% my $CFVs = CachedCustomFieldValues($CustomField);
% $m->callback( CallbackPage => '/Elements/EditCustomFieldSelect', CallbackName => 'BeforeValues',
% CustomField => $CustomField, Values => $CFVs, ARGSRef => \%ARGS );
% my @levels;
% while ( my $value = $CFVs->Next ) {
% my $name = $value->Name;
Expand Down

0 comments on commit 7c21ffa

Please sign in to comment.