[Html-widget] Setting field values using query parameters

Will Hawes info at whawes.co.uk
Tue Oct 17 16:40:41 CEST 2006


Carl Franks wrote:
> On 17/10/06, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
>> I am sure process() does preserve the values, I am using that.
> 
> Yup...
> 
> $ perl -MHTML::Widget -le '
> my $w = HTML::Widget->new;
> my $e = $w->element( Textfield => q{foo} );
> $e->value( q{bar} );
> my $r = $w->process;
> print $r;
> ' | splithtml
> <form id="widget" method="post">
> <fieldset class="widget_fieldset">
> <input class="textfield" id="widget_foo" name="foo" type="text" value="bar" />
> </fieldset>
> </form>

Indeed it does.

The problem was in fact that DBIx::Class::HTMLWidget::fill_widget wasn't 
setting field values in the first place, due to the fact that I had 
version 0.06 rather than 0.07 (I'm on FreeBSD and the port is still at 
0.06 :-/ ). Quick upgrade with CPAN.pm and all is now dandy.

Thanks for the assistance.



More information about the Html-widget mailing list