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

Tobias Kremer t at funkreich.de
Fri Sep 15 13:38:37 CEST 2006

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:

  1) A filled-out form is displayed (maybe with data from a database)
  2) You remove the data of some fields (maybe by accident) which are
     required and submit the form
  3) The form comes back with errors indicating that some fields have not been
     filled out correctly, but they now contain the original data from
     step 1 which could make the user wonder what's wrong with the data.

What do the others think? I've never come across a form that works like

-- Tobias

More information about the Html-widget mailing list