Webmastersite.net
Register Log In

Custom field search form

Comments on Custom field search form

mrowton
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan

Total Topics: 57
Total Comments: 185
mrowton
Posted Mar 10, 2006 - 11:22 AM:

Edit: This was a question but I figured it out and thought I would post my answer here. I had a little trouble with it so maybe an example similiar to this could make its way into the manual.

I have two new link fields, "Color" and "Size" (examples)

I want a form at the top of each category that allows user to select the appropriate color and size and have all links in the category that match returned on the search page. Notice that they dont actually type in a search term, just select what types of links to display.

I initially wanted to use a filter to do this because it seems more logical, however I could never get a filter to work on a multi selection text field (check boxes or multi-selection drop box) I could only get the filter to work with something that had one answer (drop down selector)

<form action="search.php?action=filter&filled=1" method="post">
<input type="hidden" name="whichtype" value="links">
<input type="hidden" name="incat" value="{CATID}">
<input type="hidden" name="colorcondition" value="like">
<input type="hidden" name="sizecondition" value="like">


<select name="colorsearch">
<option value="">Select Color</option>
<option value="">------</option>
<option value="">Any</option>
<option value="Red">Red</option>
<option value="Green">Green</option>
<option value="Blue">Blue</option>
</select>


<select name="sizesearch">
<option value="">Select Size</option>
<option value="">------</option>
<option value="">Any</option>
<option value="Small">Small</option>
<option value="Medium">Medium</option>
<option value="Large">Large</option>
</select>


<input type="submit" value="Search"></form>

Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.