April 19, 200223 yr OK, I am trying to search multiple fields using various multiple form tags on the same page. Is this possible? (I figure I am dreaming if it will really work.) You will quickly see by my code that I have tried several options in the SELECT tag, leaving them there for your reading pleasure. I can get the checkboxes to work if I only use the checkboxes. Here is my code: <TABLE width="90%" border="0" cellspacing="0" cellpadding="0" align="center"> <FORM action="FMPro" method="post"> <INPUT type="hidden" name="-db" value="district_goals.fp5"> <INPUT type="hidden" name="-lay" value="RECORD"> <INPUT type="hidden" name="-format" value="reach/p/goals/goals_info.htm"> <INPUT type="hidden" name="-Error" value="reach/p/goals/g_search_error.htm"> <INPUT type="hidden" name="-SortField" value="DISTRICT"> <INPUT type="hidden" name="-SortField" value="BUILDINGNAME"> <INPUT type="hidden" name="-Token" value="[FMP-CurrentRecID]"> <INPUT type="hidden" name="-max" value="25"> <INPUT type="hidden" name="-lop" value="or"> <TR> <TD colspan="3"> <P><FONT id="text12">Search for Washington state district WASL goals by ESD, County, or District. Limit your search by specifying a grade level(s) and/or a subject matter.</FONT></P> </TD> </TR> <TR> <TD colspan="3"> <HR> <FONT id="text12">1) Select one of the following for your search:</FONT><BR> <BR> </TD> </TR> <TR> <TD> <SELECT name="select"> <OPTION value="" selected>Select an ESD</OPTION> [FMP-ValueList:listESD,list=listESD] <OPTION value="&ESD=[FMP-ValueListItem]">[FMP-ValueListItem] </OPTION> [/FMP-ValueList] </SELECT> </TD> <TD> <SELECT name="select"> <OPTION value="" selected>Select a County</OPTION> [FMP-ValueList:listCounty,list=listCounty] <OPTION value="/fmpro?-db=district_goals.fp5&-format=reach/p/info/school_info.htm&-LAY=RECORD&COUNTYNAME=[FMP-ValueListItem]&-SortField=DISTRICT&-SortField=BUILDINGNAME&-Token=[FMP-Current RecID]&-find">[FMP-ValueListItem] </OPTION> [/FMP-ValueList] </SELECT> <TD> <SELECT name="select"> <OPTION value="" selected>Select a District</OPTION> [FMP-ValueList:listDistrict,list=listDistrict] <OPTION value="&DISTRICT=[FMP-ValueListItem]">[FMP-ValueListItem] </OPTION> [/FMP-ValueList] </SELECT> </TD> </TR> <TR> <TD colspan="3"><BR> <FONT id="text12">2) Limit your search by selecting one or more grade levels (optional):</FONT><BR> <BR></TD> </TR> <TR> <TD> <INPUT type="hidden" name="-lop" value="or"> <INPUT type="checkbox" name="GradeLevel" value="04"> <FONT id="text12">Fourth </FONT></TD> <TD> <INPUT type="hidden" name="-lop" value="or"> <INPUT type="checkbox" name="GradeLevel" value="07"> <FONT id="text12">Seventh </FONT></TD> <TD> <INPUT type="hidden" name="-lop" value="or"> <INPUT type="checkbox" name="GradeLevel" value="10"> <FONT id="text12">Tenth </FONT></TD> </TR> <TR> <TD colspan="3"><BR> <FONT id="text12">3) Limit your search by selecting a subject matter (optional):</FONT><BR> <BR></TD> </TR> <TR> <TD colspan="3"> <INPUT type="hidden" name="-lop" value="or"> <INPUT type="radio" name="Subject" value="Reading"> <FONT id="text12">Reading</FONT> <INPUT type="hidden" name="-lop" value="or"> <INPUT type="radio" name="Subject" value="Math"> <FONT id="text12">Math</FONT></TD> </TR> <TR> <TD colspan="3"> <HR> <BR> <INPUT type="submit" name="-find" value="Begin Search"> </TD> </TR> </FORM> </TABLE> NEXT UP: ColdFusion [ April 19, 2002, 03:31 PM: Message edited by: Bowman ]
April 19, 200223 yr The names of the 'select' tags need to be the same as the field name. If WC receives a name which is not a field name it has problems. The '-lop' only needs to be used once; the whole form can either be 'and' or 'or', it cannot have both I believe you should use a '-lop' of 'and'. This will allow for selections where a 'County = xyz' and a 'Grade=abc' and the 'Subject=def'. Hope this helps a bit. Garry
April 19, 200223 yr Author Great, that solved part of the problem. My new code is below. I placed the orginal -lop tags within comment tags for later reference. This is what works now: I can use ONLY one check box with one of the radio buttons (i.e., Fourth Grade with Reading), but if I select two grade levels (lets say Fourth and Seventh, it goes to the error page. My guess is that with the -lop set to AND, it will not allow multiple check boxes?? I still can not get the SELECT (pull down menus) to work even after renaming them to the specific field. I believe the problem is somewhere in OPTION value="&ESD=[FMP-ValueListItem]" portion of the the tag. What I am trying to do here is to have it search for the ValueListItem that is on the pull down menu thus value="&ESD=[FMP-ValueListItem]". This is not working. Any ideas?? <TABLE width="90%" border="0" cellspacing="0" cellpadding="0" align="center"> <FORM action="FMPro" method="post"> <INPUT type="hidden" name="-db" value="district_goals.fp5"> <INPUT type="hidden" name="-lay" value="RECORD"> <INPUT type="hidden" name="-format" value="reach/p/goals/goals_info.htm"> <INPUT type="hidden" name="-Error" value="reach/p/goals/g_search_error.htm"> <INPUT type="hidden" name="-SortField" value="DISTRICT"> <INPUT type="hidden" name="-SortField" value="BUILDINGNAME"> <INPUT type="hidden" name="-Token" value="[FMP-CurrentRecID]"> <INPUT type="hidden" name="-max" value="25"> <INPUT type="hidden" name="-lop" value="AND"> <TR> <TD colspan="3"> <P><FONT id="text12">Search for Washington state district WASL goals by ESD, County, or District. Limit your search by specifying a grade level(s) and/or a subject matter.</FONT></P> </TD> </TR> <TR> <TD colspan="3"> <HR> <FONT id="text12">1) Select one of the following for your search:</FONT><BR> <BR> </TD> </TR> <TR> <TD> <SELECT name="ESD"> <OPTION value="" selected>Select an ESD</OPTION> [FMP-ValueList:listESD,list=listESD] <OPTION value="&ESD=[FMP-ValueListItem]">[FMP-ValueListItem] </OPTION> [/FMP-ValueList] </SELECT> </TD> <TD> <SELECT name="COUNTY"> <OPTION value="" selected>Select a County</OPTION> [FMP-ValueList:listCounty,list=listCounty] <OPTION value="&COUNTYNAME=[FMP-ValueListItem]">[FMP-ValueListItem] </OPTION> [/FMP-ValueList] </SELECT> <TD> <SELECT name="DISTRICT"> <OPTION value="" selected>Select a District</OPTION> [FMP-ValueList:listDistrict,list=listDistrict] <OPTION value="&DISTRICT=[FMP-ValueListItem]">[FMP-ValueListItem] </OPTION> [/FMP-ValueList] </SELECT> </TD> </TR> <TR> <TD colspan="3"><BR> <FONT id="text12">2) Limit your search by selecting one or more grade levels (optional):</FONT><BR> <BR></TD> </TR> <TR> <TD> <!-- <INPUT type="hidden" name="-lop" value="or"> --> <INPUT type="checkbox" name="GradeLevel" value="04"> <FONT id="text12">Fourth </FONT></TD> <TD> <!-- <INPUT type="hidden" name="-lop" value="or"> --> <INPUT type="checkbox" name="GradeLevel" value="07"> <FONT id="text12">Seventh </FONT></TD> <TD> <!-- <INPUT type="hidden" name="-lop" value="or"> --> <INPUT type="checkbox" name="GradeLevel" value="10"> <FONT id="text12">Tenth </FONT></TD> </TR> <TR> <TD colspan="3"><BR> <FONT id="text12">3) Limit your search by selecting a subject matter (optional):</FONT><BR> <BR></TD> </TR> <TR> <TD colspan="3"> <!-- <INPUT type="hidden" name="-lop" value="or"> --> <INPUT type="radio" name="Subject" value="Reading"> <FONT id="text12">Reading</FONT> <!-- <INPUT type="hidden" name="-lop" value="or"> --> <INPUT type="radio" name="Subject" value="Math"> <FONT id="text12">Math</FONT></TD> </TR> <TR> <TD colspan="3"> <HR> <BR> <INPUT type="submit" name="-find" value="Begin Search"> </TD> </TR> </FORM> </TABLE>
April 19, 200223 yr "I can use ONLY one check box with one of the radio buttons (i.e., Fourth Grade with Reading), but if I select two grade levels (lets say Fourth and Seventh, it goes to the error page. My guess is that with the -lop set to AND, it will not allow multiple check boxes??" I never use the -lop tag in a form or link action. But that's me. Here's an observation about what you are attempting. If you are fortunate it will be an Ah-ha! Ok, you select two grade levels, say 4 and 7. When you perform this -find in a db you would enter the find mode and enter grade 4 (in the blank or "find-field"). Then you would "Add New Request". This would give you a second entry for the same find-field which you would then fill. Then you would click the find button. You are using cdml to enter data into the blank find-field (gradelevel) from one button and then enter a new bit of data into the same find-field (gradelevel) from another button. How have you called the "Add New Request".
April 19, 200223 yr The select should look like this: code: <SELECT name="ESD"> <OPTION value="" selected>Select an ESD</OPTION> [FMP-ValueList:listESD,list=listESD] <OPTION value="[FMP-ValueListItem]">[FMP-ValueListItem]</OPTION> [/FMP-ValueList]</SELECT> If I get a chance during the day I will have a look at some more of it. Hope this helps so far. Garry [ April 19, 2002, 04:40 PM: Message edited by: Garry Claridge ]
April 19, 200223 yr With the Grade-Levels you may want to look at using a range; e.g. >03 and <08 All the best. Garry
Create an account or sign in to comment