added check for fieldType

This commit is contained in:
Lucas Bartholemy 2006-05-13 19:46:48 +00:00
parent 6185f07642
commit 7653f450b4

View file

@ -113,8 +113,10 @@ Returns either what's posted or if nothing comes back it returns "text".
=cut
sub getValueFromPost {
my $self = shift;
return $self->session->form->param($self->get("name")) || "text";
my $self = shift;
my $fieldType = $self->session->form->param($self->get("name"));
$fieldType =~ s/[^\w]//g;
return $fieldType || "text";
}
#-------------------------------------------------------------------