Skip to content

Commit

Permalink
Reset the custom field inputs after a successful quick create
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Jan 21, 2025
1 parent 42aa161 commit c06bc7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions share/html/Helpers/QuickCreate
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ if ( $ARGS{'QuickCreateSubmit'} ) {

unless ( $skip_create ) {
push @results, ProcessQuickCreate( ARGSRef => \%ARGS );
for my $cf_field ( grep { /^Field-/ } sort keys %{$m->notes || {}} ) {
delete $m->notes->{$cf_field};
}
}

$r->headers_out->{'HX-Trigger'} = JSON(
Expand Down
1 change: 1 addition & 0 deletions share/html/Views/Component/QuickCreate
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
CustomFields => $CustomFields,
InTable => 1,
ForCreation => 1,
DefaultsFromTopArguments => 0,
&>
% }
<&| /Elements/LabeledValue, Label => loc("Content"), Class => 'input-row' &>
Expand Down

0 comments on commit c06bc7d

Please sign in to comment.