MultiSearch with dropdowns

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 12, 2010   (RSS)

Re: [Dan Maitland] MultiSearch with dropdowns

By Dave - January 12, 2010

Hi Dan,

That might look something like the following. Note that I don't know what your fieldnames are so I just guessed and put them in red:

<form method="GET" action="/path/to/your/listViewer.php">

Type:
<select name="type">
<option value="">&lt;Any&gt;</option>
<option>Red</option>
<option>White</option>
</select><br/><br/>

Year:
<select name="year">
<option value="">&lt;Any&gt;</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select><br/><br/>

Region:
<select name="region">
<option value="">&lt;Any&gt;</option>
<option>Italy</option>
<option>Chile</option>
</select><br/><br/>

Min Price:
<select name="price_min">
<option value="">&lt;Any&gt;</option>
<option value="10">$10</option>
<option value="20">$20</option>
<option value="30">$50</option>
</select><br/><br/>

Max Price:
<select name="price_max">
<option value="">&lt;Any&gt;</option>
<option value="10">$10</option>
<option value="20">$20</option>
<option value="30">$50</option>
</select><br/><br/>

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


Just make sure your wine prices are saved as numbers only and don't have dollar signs, periods, or commas in them (19.95, not $19.95). Otherwise the database won't be able to match them.

And you can find the search docs online here:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

Hope that helps! Let me know if you have any more questions about that.
Dave Edis - Senior Developer
interactivetools.com