Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Giving text box a hidden value

by fpi (Monk)
on Mar 13, 2001 at 22:08 UTC ( [id://64175]=note: print w/replies, xml ) Need Help??


in reply to Giving text box a hidden value

How about something like this?
unless ($form{'searchstring'}) { $form{'searchstring'}= '[a-zA-Z]'; } if ($desc =~ /$form{'searchstring'}/i) { ... }

It's unclear from your code, but I assume you know that this has to be done in the post-processing of the form, and not at the same time you are asking the form....

Added:
You could always do something like this when you are asking the form: <input type="text" name="searchstring" size="18" VALUE="any character"> Of course, "any character" will appear in the search box every time, and the program will default to searching for "any character" unless you add something like this:
if ($form{'searchstring'} eq "any character") { $form{'searchstring'}= '[a-zA-Z]'; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-26 03:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found