[Html-widget] Default values of Submit-elements after form-submission

Adam Sjøgren adsj at novozymes.com
Thu Sep 28 09:09:27 CEST 2006


On Wed, 27 Sep 2006 16:28:29 +0100, Carl wrote:

> I don't think you're using it in a stupid way at all, there's just
> different ways of using it.

Glad to hear that; H:W is, in my eyes, a little rough around the edges
still, so sometimes I find it a little hard to discern what a
"natural" way to do things is.

I should perhaps also mention that in general I'm very happy with H:W
:-)

> The behaviour was changed because it was considered confusing
> behaviour if an empty field caused an error, but the field was then
> filled in with the default value. The error message wouldn't make much
> sense.

I though it might be something like that - makes sense, if used that
way, I can see.

[...]
> Something like...
>  my $widget=HTML::Widget->new('mywidget');
>  $widget->element('Submit', 'update')->value('Update')->retain_default(1);
>  $widget->element('Submit', 'preview')->value('Preview')->retain_default(1);
> ... wouldn't that solve your problem?

If that also influences the default 'checked'-state of checkboxes (and
also for the other kinds of states, radio-buttons, selects), I would
be happy as a clam, yes.


  Best regards,

    Adam

-- 
                                                          Adam Sjøgren
                                                    adsj at novozymes.com



More information about the Html-widget mailing list