fixes for data form list fields
This commit is contained in:
parent
0e299cc18b
commit
dbe99c3295
2 changed files with 5 additions and 2 deletions
|
|
@ -129,7 +129,7 @@ sub convertDataForm {
|
|||
name => $fieldData->{name},
|
||||
status => $fieldData->{status},
|
||||
type => "\u$fieldData->{type}",
|
||||
possibleValues => $fieldData->{possibleValues},
|
||||
options => $fieldData->{possibleValues},
|
||||
defaultValue => $fieldData->{defaultValue},
|
||||
width => $fieldData->{width},
|
||||
subtext => $fieldData->{subtext},
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ sub _createForm {
|
|||
my $data = shift;
|
||||
my $value = shift;
|
||||
# copy select entries
|
||||
my %param = map { $_ => $data->{$_} } qw(name height width extras vertical defaultValue);
|
||||
my %param = map { $_ => $data->{$_} } qw(name height width extras vertical defaultValue options);
|
||||
$param{value} = $value;
|
||||
$param{size} = $param{width};
|
||||
|
||||
|
|
@ -64,6 +64,9 @@ sub _createForm {
|
|||
if ($data->{type} eq "checkbox") {
|
||||
$param{defaultValue} = ($param{defaultValue} =~ /checked/i);
|
||||
}
|
||||
elsif ( isIn($data->{type}, qw(selectList selectBox checkList radioList)) ) {
|
||||
delete $param{size};
|
||||
}
|
||||
my $control = eval {
|
||||
WebGUI::Pluggable::instanciate("WebGUI::Form::\u$data->{type}", "new", [ $self->session, \%param ]);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue