Hi,

i already tried to contact the authors of DBIx::Class::HTMLWidget but 
got no reply. So maybe somebody here can help me.

I've a application which uses DBIx::Class:HTMLWidget. On one page one 
can set options via textfields, selectboxes and checkboxes. Everything 
except the checkboxes got saved. There was no error message, the element 
names where correct...

I narrowed the problem down to the following code in HTMLWidget.pm line 43:

my %cb = map {$_->name => undef if 
$_->isa('HTML::Widget::Element::Checkbox')} @{ $result->{_elements} };

[the %cb hash ought to contain the checkbox names as keys]

I replaced that line with the not so fancy, but for me working:
my %cb;
foreach (@{ $result->{_elements} }) {
     if ( $_->isa('HTML::Widget::Element::Checkbox') ) {
         $cb{$_->name} = undef;
     }
}

Now my question: is that a bug? Or just a problem with my perl version? 
Anybody else having problems with DBix::Class:HTMLWidget and checkboxes?

Dennis

-- 
"... [it is] something unearthly ... If there are sentient beings
on other planets, then they play Go."
- Emanuel Lasker, chess grandmaster

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to