diff --git a/lib/WebGUI/FormProcessor.pm b/lib/WebGUI/FormProcessor.pm index cb6e5e949..6af381b60 100644 --- a/lib/WebGUI/FormProcessor.pm +++ b/lib/WebGUI/FormProcessor.pm @@ -70,7 +70,7 @@ These functions are available from this package: =head2 checkbox ( name ) -Returns either an array of values or a scalar value depending upon what you request. +Returns an array or a comma-space (", ") separated scalar depending upon whether you're returning the values into an array or a scalar. =over @@ -91,7 +91,7 @@ sub checkbox { =head2 checkboxList ( name ) -Returns either an array of values or a scalar value depending upon what you request. +Returns an array or a comma-space (", ") separated scalar depending upon whether you're returning the values into an array or a scalar. =over @@ -204,7 +204,7 @@ sub email { =head2 fieldType ( name ) -Returns either an array or a scalar depending upon what you request. Defaults to "text". +Returns an array or a comma-space (", ") separated scalar depending upon whether you're returning the values into an array or a scalar. Defautls to "text". =over @@ -315,7 +315,7 @@ sub hidden { =head2 hiddenList ( name ) -Returns either an array or a scalar depending upon what you request. +Returns an array or a comma-space (", ") separated scalar depending upon whether you're returning the values into an array or a scalar. =over @@ -528,7 +528,7 @@ sub radioList { =head2 selectList ( name ) -Returns an array or a string depending upon which you request. +Returns an array or a comma-space (", ") separated scalar depending upon whether you're returning the values into an array or a scalar. =over @@ -541,7 +541,8 @@ The name of the form variable to retrieve. =cut sub selectList { - return $session{cgi}->param($_[0]); + my @data = $session{cgi}->param($_[0]); + return wantarray ? @data : join(", ",@data); }