CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Perl

 Error submiting multiple value fields such as checkbox list

Print topic Send  topic

Author Message
roeya


Posts: 181
Posted: 04/02/2006, 4:44 AM

In CCS 3.0.3.1:

If you submit multiple value field such as checkbox list there is an error in CCConvertEncodingHash that cause it to erase the values:
When the fucntion checks if fields are ARRAY or HASH using the following code:
if (ref $val =~ /ARRAY/) {
CCConvertEncodingArray($val, $from, $to);
} elsif (ref $val =~ /HASH/) {
CCConvertEncodingHash($val, $from, $to);
} else {
$val = CCConvertEncoding($val, $from, $to);
}

There is a bug in evaluating - instead of evaluting ref $val and then checking it against the RE (/ARRAY/) first it is checked against the /ARRAY/ and the result is evaluated by ref which will be always ''

You should change the ref to ref() in the code to:
if (ref ($val) =~ /ARRAY/) {
CCConvertEncodingArray($val, $from, $to);
} elsif (ref ($val) =~ /HASH/) {
CCConvertEncodingHash($val, $from, $to);
} else {
$val = CCConvertEncoding($val, $from, $to);
}

I checked this with perl 5.8.7 from activestate

I submited the bug to support, this is just to let you know
_________________
http://www.infoneto.com/
View profile  Send private message
roeya


Posts: 181
Posted: 04/02/2006, 6:33 AM

A way around the bug:

my @reasons = $cgi->param("reject_reasons");

where "reject_reasons" is the field name
what is returned is an array with the values.

However the values are not encoded in the right encoding unless you use only 7bit ASCII code
_________________
http://www.infoneto.com/
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.