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

Carl Franks fireartist at gmail.com
Fri Sep 15 13:42:54 CEST 2006


On 15/09/06, Tobias Kremer <t at funkreich.de> wrote:
> Zitat von Carl Franks <fireartist at gmail.com>:
>
> > On 07/09/06, Tobias Kremer <t at funkreich.de> wrote:
> > > 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 think this only happens is the field is missing.
> > If it's submitted empty (foo => ''), then you get an error.
>
> Yes, I do get an error if a field is submitted empty (and required). But
> when the form is redisplayed for the user to correct the errors the
> empty fields are re-filled with the original data. This behaviour is quite
> weird IMHO:

Ah, right - I get you now. No, it's not very sane behaviour.

Hopefully that'll be fixed when I make the change mentioned in the
other email I sent to this thread today.

It'd be a great help if you could write a test file for this.

Carl



More information about the Html-widget mailing list