Gossamer Forum
Home : Products : DBMan : Customization :

How do I hide a searchable criteria?

Quote Reply
How do I hide a searchable criteria?
I have a section of the database open to non-registered users which allows them to search the database. However, I want to constrain the search to only data which meets a criteria. The users can search for data based on a state or province, but I want to automatically narrow the search within the state or province so that only certain records are shown. The code I have in my html2.pl file (a modified html.pl file for the non-registered users) looks like this in the sub html_record_form

<tr><td align="right" valign="top"><$font>State:</font></td><td valign="top"> |;print&build_select_field("Sw","$rec{'Sw'}");print qq|</td></tr>

<tr><td align="right" valign="top"><$font>Most?:</font></td><td valign="top"> |;print&build_radio_field("Most","$rec{'Most'}");print qq|</td></tr>

It is the second <tr> which I want to use as a secondary search criteria and keep hidden from non-registered users. The field "Most" is a radial button with options Yes and No. I want to select all records in the selected State which have Most=Yes. What is the code I should use for this? Thank you in advance.
Quote Reply
Re: How do I hide a searchable criteria? In reply to
Just make a hidden field. You might want to place it before the table where your other fields are. (It really doesn't matter where you put it, though.)

Within a print qq| statement, use

<input type=hidden name="Most" value="Yes">

That'll do it!


------------------
JPD
Quote Reply
Re: How do I hide a searchable criteria? In reply to
That did it! Thank you. Thank you. Thank you!
Quote Reply
Re: How do I hide a searchable criteria? In reply to
You're welcome! You're welcome! :-)


------------------
JPD