Searching Filemaker
FileMaker Home
FileMaker Configuration
Creating an Online Form
Creating a Search Form
Creating the Search Response
Return to Manual Table of Contents
This is somewhat more complex than the form to add to the database.
Here is a sample form for submitting a search. The comments inside the
HTML will help explain what is going on:
<HTML>
<HEAD>
<TITLE>FileMaker search</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<H1>This is a Search</H1>
<FORM ACTION="http://computerHostingFilemaker:8080/FMPro"
METHOD="POST"> <INPUT TYPE="hidden" NAME="-db" VALUE="sesqui.FP3"> <INPUT TYPE="hidden" NAME="-format"
VALUE="search_results.html"> <INPUT TYPE="hidden" NAME="-error"
VALUE="search_results.html">
<P>You can see a list of everything in the database
by typing a space into one of the fields</P>
<TABLE width="98%" border="0" align="top"> <TR><TD>First Name</TD>
<!--This first part is a drop down list-->
<!--we can choose search parameters this way-->
<TD><SELECT NAME="-op">
<OPTION value="eq">is
<OPTION value="neq">is NOT
<!--SELECTED is the default-->
<OPTION value="ct" SELECTED>contains
<OPTION value="bw">begins with
<OPTION value="ew">ends with
</SELECT>
<!--Enter text into this text field to search--> <INPUT TYPE="text" NAME="First Name" VALUE=""
SIZE=20></TD></TR>
<TR><TD>Last Name</TD>
<TD><SELECT NAME="-op">
<OPTION value="eq">is
<OPTION value="neq">is NOT
<OPTION value="ct" SELECTED>contains
<OPTION value="bw">begins with
<OPTION value="ew">ends with
</SELECT>
<INPUT TYPE="text" NAME="Last Name" VALUE=""
SIZE=20></TD></TR>
<!--This drop down list lets us choose -->
<!--how the results are sorted-->
<TR><TD colspan="2"><P> </P></TD></TR>
<TR><TD>Sort results by</TD> <TD><SELECT NAME="-SortField"> <OPTION value="First Name">first name <OPTION SELECTED value="Last Name">last name </SELECT> </TD></TR> <!--This lets us choose the number of-->
<!--results per page-->
<TR><TD>Results per page:</TD> <TD><SELECT NAME="-Max"> <OPTION value="5">5 <OPTION SELECTED value="10">10 <OPTION value="20">20 <OPTION value="50">50 <OPTION value="100">100 </SELECT> </TD></TR>
</TABLE>
<!--submit-->
<!--notice that the name is "-find"-->
<!--this tells FileMaker what to do-->
<P><INPUT type="submit" NAME="-find"
value="Start Search">
<INPUT type="reset" value="Clear Form"></FORM></P>
</BODY></HTML> |
As you can see, the search has a few special tags. First, there is the "-op" in
the drop-down lists. This option will let the user choose what kind of
search they perform.
The "-SortField" name will determine how the output is sorted.
The "-Max" will determine the maximum results per page.
Lastly, the "-find" in the submit tag will tell FileMaker
that it should search.