Patch HTMLForm to make dynamically generated forms sticky.
This commit is contained in:
parent
fa9a7ca87f
commit
338c828a88
1 changed files with 2 additions and 1 deletions
|
|
@ -155,6 +155,7 @@ a C<get> method to provide that information.
|
|||
|
||||
sub dynamicForm {
|
||||
my ($self, $formDefinition, $fieldList, $parent) = @_;
|
||||
my $form = $self->session->form;
|
||||
foreach my $definition (reverse @{$formDefinition}) {
|
||||
my $properties = $definition->{$fieldList};
|
||||
foreach my $fieldname (keys %{$properties}) {
|
||||
|
|
@ -165,7 +166,7 @@ sub dynamicForm {
|
|||
$params{$key} = $formDefinition->[0]{name};
|
||||
}
|
||||
}
|
||||
$params{value} = $parent->get($fieldname);
|
||||
$params{value} = $form->get($fieldname) || $parent->get($fieldname);
|
||||
$params{name} = $fieldname;
|
||||
$self->dynamicField(%params);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue