Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: HTML::FillInForm

by knowmad (Monk)
on Aug 14, 2003 at 12:00 UTC ( #283840=note: print w/ replies, xml ) Need Help??


in reply to HTML::FillInForm

Nice examples of the benefits of HTML::FillInForm. I avoided it for years because it seemed like yet another module to kee up with; it's now a priority.

At any rate, I was trying to figure out how to get it to repopulate checkbox groups with multiple values. For some reason, you must use the fdat parameter and pass in a hash reference instead of doing the fobject parameter.

For example, to process the following code:

<input value="1" type="checkbox" checked name="need_id"> Advocacy <input value="2" type="checkbox" checked name="need_id"> Domestic Viol +ence <input value="3" type="checkbox" checked name="need_id">Racial Diversi +ty

You would use something like the following:

my %fdat = $q->Vars; my $html = <output from favorite flavor of templating language> my $fif = new HTML::FillInForm; $html = $fif->fill(scalarref => \$html, fdat => \%fdat);

Now sit back and let this module do even more of the busy work for you!

William


Comment on Re: HTML::FillInForm
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://283840]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2015-07-31 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls