Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Dropdown fields in query search?

Quote Reply
Dropdown fields in query search?
OK, I've managed to figure out how to use the relationships & queries to get to the following point:

http://www.mhsmi.org/cgi-bin/dbsql/db.cgi?do=search_form&db=BOOK2&q=searchbook

(Login/Password: guest/guest)

If you do the standard search ("BOOK2" at the very bottom) the search form includes drop-down menus for the Department and Course fields, which is correct.

However, when you use the "searchbook" query (which is what I want to use), the Department and Course fields show up as text fields instead of drop-down menus, which is *not* what I want.

Any assistance would be appreciated.

Also, how do I change the default in the query search from "As Rows" to "As Elements?"

Thanks in advance,

Charles
Quote Reply
Re: [Brainwrap] Dropdown fields in query search? In reply to
Hi,

Sorry about the late reply!

In this case, you should customise the qsearch_form.html instead of using the <%Dbsql::Relation::HTML::generate_qsearch_form%>. You can generate the 'Deparment' drop-down by using:

Department: <%Dbsql::Relation::HTML::generate_full_down('DEPARTMENT2', 'BOOK2', 'DEPARTMENT2')%>

Hope that helps.

TheStone.

B.