PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Custom meta fields and search form

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

  • Custom meta fields and search form

    We're using V 7 (Build 1007) Professional Edition. PHP, offline mode. I setup a custom meta field <meta content="Family Medicine " name="SPECIALTY">.
    I added it in Zoom (see attached image). We have a search page on our site already. I created a copy: www.citizensmemorial.com/search/providers/index-test.html

    It doesn't return any results when you use the select field. I'm not sure what I'm doing wrong. I've attached an image of the file output. I can see the specialty meta field related code in the settings.php file. I'm not seeing any form/select field generated.

    Thanks

    I had to remove the attachments. Once I'm approved, I can upload those.

  • #2
    You're not seeing any form/select field generated because you've disabled it.

    This is under "Configure"->"Search Page"->"Search form" (it would be set to "Do not generate"). If you change this setting back to the default ('Advanced') and re-index, then the search form and all meta fields would show up when you access the search page here:
    https://www.citizensmemorial.com/search/Provider%20Search/search.php

    But instead, at the moment, you have your own custom search form created on a different page here:
    https://www.citizensmemorial.com/search/providers/index-test.html

    That's OK provided you specifically wanted to make a customised search form like you have.

    The next problem is that your HTML is missing a few things.

    This is what you have:

    Code:
    <p class="tab-heading">Search by Specialty:</p>
    <form action="https://www.citizensmemorial.com/search/Provider Search/search.php" method="get"><select class="zoom_metaform_dropdown" id="select" name="SPECIALTY">
    <option>Anesthesiology</option>
    <option>Audiology</option>
    <option>Cardiology</option>
    ... etc.
    </select><input class="search-btn-docs" type="submit" value="Go"/></form>
    It should be:

    Code:
    <p class="tab-heading">Search by Specialty:</p>
    <form action="https://www.citizensmemorial.com/search/Provider Search/search.php" method="get"><select class="zoom_metaform_dropdown" id="select" name="SPECIALTY">
    [B]<input type="hidden" name="zoom_query" value="" />[/B]
    <option [B]value="0"[/B]>Anesthesiology</option>
    <option [B]value="1"[/B]>Audiology</option>
    <option [B]value="2"[/B]>Cardiology</option>
    ... etc.
    </select><input class="search-btn-docs" type="submit" value="Go"/></form>
    As noted, you would not have to manage the number values/order if you used the generated search form. And it would also appear on your search results page with the user's selection etc. So there's advantages to using the generated one.

    The hidden input tag is necessary because you have created a search form that attempts to list everything under a particular meta field criteria, with no query. I have presumed this is what you are after.

    Hope that helps.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      I deleted our existing search template, below is the link to the one generated by zoom. But I'm not getting any results with the select.

      https://www.citizensmemorial.com/search/Provider%20Search/search.php

      I'd prefer the custom form. I tried using the html you supplied, but my software or web browser, keeps moving the


      https://www.citizensmemorial.com/search/providers/index-test.html<input type="hidden" name="zoom_query" value="" /> line before the select line https://www.citizensmemorial.com/search/providers/index-test.html If I use a text editor, it will stay after the <select> tag, but the select field appears empty and all the values are listed below it on the page.

      Comment


      • #4
        I also created a new directory to test and I'm not getting any results:
        https://www.citizensmemorial.com/search/ProviderTest/search.php

        I confirmed the pages have the custom meta field tag inside the head tag.

        Comment


        • #5
          It appears the custom meta tags on your pages have an extraneous space character as follows:

          <meta content="Emergency Medicine " name="SPECIALTY"/>

          Try correcting this (remove the space after "Medicine") and make sure to enable "Reload all files (do not use cache)" under "Configure"->"Spider options" and re-index. And let us know if you still have a problem.

          The "dropdown" meta fields option relies on "Exact match" criteria so this is necessary.
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment

          Working...
          X