Home » Forum

Announcement

Collapse
No announcement yet.

Select field and exact search terms

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Select field and exact search terms

    I'm trying to use a select field, but search the exact terms.
    Here is my sample page:
    https://www.citizensmemorial.com/Test2014/search/providers/index.html

    I've tried this code and get to many results - specifically with the Cardiovascular Disease.

    <form action="https://www.citizensmemorial.com/Test2014/search/Provider Search/search.php" method="get"><input class="search-btn" type="submit" value="Go" />
    <select class="search-input" name="zoom_query" id="select">
    <option value="Anesthesiology">Anesthesiology</option>
    <option>Audiology</option>
    <option value="Cardiovascular Disease">Cardiovascular Disease</option>
    <option value="Clinical Pathology & Anatomic Pathology">Clinical Pathology & Anatomic Pathology</option>
    <option>Critical Care Medicine</option>
    </select>
    </form>

    I tried changing it to this:
    <option value=""Cardiovascular Disease"">Cardiovascular Disease</option>
    But get "no search query entered".

    If I search the text box for "Cardiovascular Disease" I get the results I would like to get from the select menu.

    Any ideas?

  • #2
    Try HTML encoding the quotes to get the exact phrase search working in the drop down.

    Like this,
    <option value="&quot;Cardiovascular Disease&quot;">Cardiovascular Disease</option>

    Comment

    Working...
    X