Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

HTML::FormHandler fill in default value

by keenlearner (Acolyte)
on Feb 07, 2012 at 14:29 UTC ( #952289=perlquestion: print w/replies, xml ) Need Help??
keenlearner has asked for the wisdom of the Perl Monks concerning the following question:

Hi, experts, I am using HTML::FormHandler and trying to fill in value into the input type="text" , I am new to Moose, I try to read the code in FormHandler but still cannot find the way to fill default value into the input text. Has anybody achieve this ? Thanks.
my $args = { name => 'test_form', field_list => [ 'username' => { type => 'Text', apply => [ { check => qr/^[0-9a-z]*/, message => 'Contains invalid characters' } ] } ] }; my $form = HTML::FormHandler->new( %$args ); my $renderedform = $form->render; print $renderedform;

Replies are listed 'Best First'.
Re: HTML::FormHandler fill in default value
by kcott (Chancellor) on Feb 07, 2012 at 15:02 UTC
Re: HTML::FormHandler fill in default value
by Anonymous Monk on Feb 07, 2012 at 14:55 UTC
Re: HTML::FormHandler fill in default value
by keenlearner (Acolyte) on Feb 07, 2012 at 15:18 UTC
    Wow...I have read that document but didn't understand that that default is actually pointing to the value. Thanks it works.

      In quite a few situations, the “default value” is something that produces a value.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://952289]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
[Corion]: Also, I think the OPs problem is on their intranet and not on the internet (also, they should likely use WWW::Mechanize instead, which knows about cookie)
[1nickt]: yes, could be.
[1nickt]: I don;t see the link , definitely, after reloading the node
[1nickt]: Is it possible to disable it?
[Discipulus]: if you mean [download] after the code it is there 1nickt
[1nickt]: yes, Corion sees it too, and I see it when not logged in.
[Corion]: I think you can disable download links in your settings?
[1nickt]: Looking in settings to see if I disabled it in my profile ...
[1nickt]: There is "Don;t show embedded d/l links" in Display settings. It is unchecked.
[1nickt]: Oh, there is a minimum lines setting!

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-05-23 18:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?