Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: CGI.pm Disillusionment

by jonadab (Parson)
on Jun 08, 2003 at 21:03 UTC ( [id://264159]=note: print w/replies, xml ) Need Help??


in reply to CGI.pm Disillusionment

If by stickiness you mean what I think you mean, you don't need CGI.pm for that. You presumably are already passing the form values selected by the user back to your script as input (either in a QUERY_STRING or via POST) because otherwise there'd be no point in having those fields in the first place, except maybe decor. So, when you print out your form elements (however you do it), just prefill them with the existing input. You can use ||= to set defaults, to cover the case where the user is getting the form for the first time. (If " " or zero is a legit value, you can use a defined ... or structure to do the same thing, e.g., defined $input{foo} or $input{foo}="blah";.)


{my$c;$ x=sub{++$c}}map{$ \.=$_->()}map{my$a=$_->[1]; sub{$a++ }}sort{_($a->[0 ])<=>_( $b->[0])}map{my@x=(& $x( ),$ _) ;\ @x} split //, "rPcr t lhuJnhea eretk.as o";print;sub _{ord(shift)*($=-++$^H)%(42-ord("\r"))};

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found