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

Carl Franks fireartist at gmail.com
Fri Sep 29 13:07:46 CEST 2006

On 28/09/06, Adam Sjøgren <adsj at novozymes.com> wrote:
> On Wed, 27 Sep 2006 16:28:29 +0100, Carl wrote:
> >  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.

This has been implemented in revision 5042.

All field elements (except Upload) support retain_default(), and
Checkbox, Radio(Group) and Select should work as expected.

You can check the xml output in the new test file


More information about the Html-widget mailing list