diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 0c0d18413..598e07508 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,7 @@ 7.3.16 - fix: Wiki titles not automatically linked - fix: Email to forum not working from Mac + - fix: Unable to set size in DynamicField (Diona Kidd / Knowmad) - fix: Calendar Events Disappearing http://www.plainblack.com/bugs/tracker/calendar-events-disappearing - fix: Modified SQLForm.pm to handle MySQL null dates. Undefs them. Undef dates default to time(), i.e. today's date diff --git a/lib/WebGUI/Form/DynamicField.pm b/lib/WebGUI/Form/DynamicField.pm index 02add974c..bfca9fe0a 100644 --- a/lib/WebGUI/Form/DynamicField.pm +++ b/lib/WebGUI/Form/DynamicField.pm @@ -102,11 +102,6 @@ sub new { my $param = \%raw; my $fieldType = ucfirst($param->{fieldType}); delete $param->{fieldType}; - my $size; - if (exists $param->{size}) { - $size = $param->{size}; - delete $param->{size}; - } # Return the appropriate field object. if ($fieldType eq "") { $session->errorHandler->warn("Something is trying to create a dynamic field called ".$param->{name}.", but didn't pass in a field type."); @@ -126,15 +121,12 @@ sub new { return undef; } my $formObj = $cmd->new($session, $param); - ##Fix up methods for List type forms and restore the size to all Forms *except* - ##List type forms. Historically, dynamically created forms have always - ##used the default size. if ($formObj->isa('WebGUI::Form::List')) { $formObj->correctValues($param->{value}); $formObj->correctOptions($param->{possibleValues}); } - elsif ($size) { - $formObj->set('size',$size); + if ($param->{size}) { + $formObj->set('size',$param->{size}); } return $formObj; }