[Html-widget] Select fields and '0' value - again
t at funkreich.de
Thu Sep 7 10:05:28 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.
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?
More information about the Html-widget