add extras to FormBuilder
This commit is contained in:
parent
d5d7d7ef0b
commit
adcec8353a
2 changed files with 23 additions and 3 deletions
|
|
@ -70,6 +70,14 @@ The name of the form. Not required, but recommended.
|
|||
|
||||
has 'name' => ( is => 'rw' );
|
||||
|
||||
=head2 extras
|
||||
|
||||
Any extra things to add to the <form> tag. Optional.
|
||||
|
||||
=cut
|
||||
|
||||
has 'extras' => ( is => 'rw', isa => 'Str', default => '' );
|
||||
|
||||
=head2 session
|
||||
|
||||
A WebGUI::Session object. Required.
|
||||
|
|
@ -152,7 +160,7 @@ sub getHeader {
|
|||
my @attrs = qw{ action method name enctype };
|
||||
my $attrs = join " ", map { qq{$_="} . $self->$_ . qq{"} } grep { $self->$_ } @attrs;
|
||||
|
||||
my $html = sprintf '<form %s>', $attrs;
|
||||
my $html = sprintf '<form %s %s>', $attrs, $self->extras;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue