From 671bcb3c1bf4647bef23d4e480e048fec22cfe80 Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Fri, 14 Oct 2005 19:31:06 +0000 Subject: [PATCH] fix [ 1310360 ] WebGUI::FormProcessor::checkbox not working correctly --- lib/WebGUI/Form/Checkbox.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/WebGUI/Form/Checkbox.pm b/lib/WebGUI/Form/Checkbox.pm index bbfb686bb..31ab3ff9f 100644 --- a/lib/WebGUI/Form/Checkbox.pm +++ b/lib/WebGUI/Form/Checkbox.pm @@ -97,6 +97,24 @@ sub getName { } +#------------------------------------------------------------------- + +=head2 getValueFromPost ( ) + +Retrieves a value from a form GET or POST and returns it. If the value comes back as undef, this method will return undef. + +=cut + +sub getValueFromPost { + my $self = shift; + my $formValue = $session{cgi}->param($self->{name}); + if (defined $formValue) { + return $formValue; + } else { + return undef; + } +} + #------------------------------------------------------------------- =head2 toHtml ( )