I want to provide a simple option for a end user to be able to select a data report based on values in a drop down option box, and then have them appear on a simplistic form (later be updated to select and modify) for data verification.

I have the following code:
<form action="http://cgi-bin/Inventory.pl" method="get"> SELECT * FROM 'Inventory' WHERE <select style="font-size:11px;" name="field"> <option value="sernam">Serial Number</option> <option value="asset">Asset Tag</option> <option value="brno">Branch</option> </select> <select name="likeEquals" style="font-size:11px;"> <option value="=">=</option> </select> <input style="font-size:11px;" type="text" name="searchTerm"/> <input style="font-size:11px;" type="submit" name="search" value=" +Search"/> </form>

The above works, but I want to modify it to have the text box to be another option/dropdown box. Similar to the following:

<form action="http://webnm/cgi-bin/Inventory.pl" method="get"> SELECT * FROM 'asset_management' WHERE <select style="font-size:11px;" name="field"> <option value="brno">Branch</option> </select> <select name="likeEquals" style="font-size:11px;"> <option value="=">=</option> </select> <select style="font-size:11px;" name="br"> <option value="HDQTR">Headquarters</option> <option value="CHI">Chicago</option> <option value="DNV">Denver</option> </select> <input style="font-size:11px;" type="submit" name="search" value=" +Search"/> </form>

I want the user to be able to pick out the branch they are looking for data from and after select have that automatically provide the data. How can I make an Option box be treated like a text box? I am pretty new to Perl and figure I have to convert a option value into the text value, but I am not sure how to go about this. Would I use the substitution property to accomplish this or something else? If I am subsituting, then how exactly is the option value stored vs the text value? Any suggestions would be greatly appreciated!


In reply to How can I change Option values into Text Values by jaacmmason

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.