simple dropdwon search form

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

By (Deleted User) - August 1, 2010

Hi!

I am trying to do a simple search form that has a dropdown menu to seach by country. I can't make it works.

This is the page:

http://www.koshertravelinfo.com/minyan/minyan_country.htm

<center><form method="POST" action="http://www.koshertravelinfo.com/minyan/minyan_listing.php"><select>
<option value="">by destination</option>
<option value="USA">USA</option>
<option value="Canada">Canada</option>
</select><input type="submit" name="submit" value="Search Minyan">
</form></center>


Any help will be apreciated.

Re: [Jason] simple dropdwon search form

By (Deleted User) - August 2, 2010

Works fine now. Thanks a lot.

2 more questions...

I would like to have a divider in the middle of the drop down menu but the divider should not be a link. I want to group the most common countries on top and then all the rest with a blank divider or maybe a dotted line like this:

USA
Canada
Mexico
---------
Country1
Country2
Country3

Also, I want the search to be a "match" not keyword search like this it will only give exact much.

Re: [RapidWeb] simple dropdwon search form

By Jason - August 2, 2010

Hi,

For your first question, you can use the <optgroup> tag to put your countries into groups. See this for examples on how to do this:
http://www.w3schools.com/TAGS/tag_optgroup.asp

As for your second question. Even if it's doing a "keyword" search, it will still be pretty exact. The way it works is it would match characters that come either before or after the option you select. For example, if you selected "Canada" and had a country called "Canada - West Coast", it would match this. If you used an "exact" search, it wouldn't.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] simple dropdwon search form

By (Deleted User) - August 2, 2010

Thank you for your help! I listed the most popular countries on top of the drop down list with a label called 'Pouplar countries' and then listed all countries in alphabetical order with a lable 'All Countries in Alphabetical Order'.

Just what I wanted and the labels themselves are not clickable. Maybe when I will have more time I will list them by Continent.