[Html-widget] Select fields and '0' value - again

Carl Franks fireartist at gmail.com
Thu Sep 7 11:12:38 CEST 2006


> I'm still having trouble using '0' values in select lists. I'm using Catalyst,
> the C::Plugin::HTML::Widget plugin and its $c->widget_result() method. There's
> a select field which has the following options:
> [ 0 => 'unsubscribed', 1 => 'subscribed' ]
> The Select field is initialized with $el->value( '1' ) (from a database record).
> However, when changing the value in the form to 'unsubscribed' (=0) it jumps
> back to its default 'subscribed' (=1) after submitting the form.

I've fixed a bug with the Select element.
I've added a new test file, can you look at it, and make sure it's
testing the same problem you had? -

> Furthermore, I'm wondering if there's a sane way to stop HTML::Widget
> from reverting to the default values (set with "->value") for fields that
> have an "All" constraint defined but were submitted empty?

I'll take a look at this, and see if I can put together a test file to
describe this.


More information about the Html-widget mailing list