Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to create a hidden text field?

Posted on 2000-03-09
1
Medium Priority
?
208 Views
Last Modified: 2010-03-05
print p("Book Code: ", textfield("book", $bookcode));

How to modify the above code to create a hidden text field?
Or how to make a  variable name "book" to store the value of perl variable $bookcode?
0
Comment
Question by:nelsonyuen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
guadalupe earned 40 total points
ID: 2600393
If you using CGI.pm this is the way:

        print $query->hidden(-name=>'hidden_name',
                             -default=>['value1','value2'...]);

If not then I don't understand the code above... Tell me what your using or show me some more code.  If you want to do it by hand try this:

print qq(<input type="hidden" name="book" value="$bookcode">);

The qq() is just double quotes but you can use this method so as not to have to escape all the double quotes the string may contain.



0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question