Jump to content

Building a Search


This topic is 7975 days old. Please don't post here. Open a new topic instead.

Recommended Posts

confused.gif

I want to build a search over three fields and am not sure how to combined the first find with the second, and then the first and second with the third. Each step refining the search to a smaller amount of records.

For example, first -find would result in everyone in a particular city (from the "city" field). The resulting page would not show results but allow the searcher to find everyone in that city (just searched for) that has a cat or dog or chicken, depending on the creteria they select in a drop down menu. The next page would also not include results but allow the searcher to narrow their search to color of dog: black, brown, white, all (for example). Each search page is narrowing the results and the final page lists the results of the three seperate createria selected over three pages.

I tried this with all the creteria from three fields selected from one page with some fairly negative results. I will now attempt to break it apart into three seperate pages, but how do I carry over each result without starting a new search each time?

Thanks grin.gifgrin.gifgrin.gif

Link to comment
Share on other sites

when you find something you could use [FMP-CurrentFind][FMP-FindValueItem][/FMP-CurrentFind] and then add an other. combining the 3 in the third step is more difficult I believe, but I am not sure.

with 2 tokens it is possible

Link to comment
Share on other sites

[color:"orange"]I like the idea what would the code look like when combined with a token?

confused.gif

when you find something you could use [FMP-CurrentFind][FMP-FindValueItem][/FMP-CurrentFind] and then add an other. combining the 3 in the third step is more difficult I believe, but I am not sure.

with 2 tokens it is possible

kind regards

Sharky K.

Link to comment
Share on other sites

[color:"orange"] The top part of your response looks like what I am trying to do, but what does "mycity", "myanimals", and "mycolor" represent? Is that what you are indicating each realated field is equal to?

I have pull down menus where the user would select one city, one animal, and one color (for example), and the results would list all found items!

Garry, you were helping me on this same problem back in April but I have never been able to get it to work. A link to the original thred is:

http://www.fmforums.com/threads/showflat.php?Cat=&Board=UBB22&Number=22976&Forum=UBB22&Words=search%20multiple%20fields&Match=And&Searchpage=0&Limit=25&Old=1year&Main=22976&Search=true#Post22976

confused.gif

Doing three separate searches will be no different from doing one search like this:

&city=mycity&animal=myanimal&colour=mycolour&-find

Or, do you want the user to be presented with a value-list relative to their previous selection?

Hope this helps.

Garry

Link to comment
Share on other sites

They are the fields. E.G.

<select name="city">

<option value="New York">NewYork</option>

<option value="Sydney">Sydney</option>

</select>

<select name="animal">

<option value="dog">dog</option>

<option value="cat">cat</option>

</select>

<select name="color">

<option value="red">Red</option>

<option value="brown">Brown</option>

</select>


Used with the rest of the form and the '-find' tag. You should be able to get the results you require.

Hope this helps.

Garry

Link to comment
Share on other sites

Here is the Value List version:

<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>

</TD>

<TD>

<SELECT name="county">

<OPTION value="" selected>Select a County</OPTION>

[FMP-ValueList:listCounty,list=listCounty]

<OPTION value="[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="[FMP-ValueListItem]">[FMP-ValueListItem]</OPTION>

[/FMP-ValueList]

</SELECT>


Good Luck.

Garry

Link to comment
Share on other sites

This topic is 7975 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.