ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom Search Drop-down

November 24, 2008 6:31pm

Subscribe [3]
  • #1 / Nov 24, 2008 6:31pm

    sparkle

    13 posts

    I have been looking all over for a way to do this, and have probably missed something obvious.

    Here’s my situation:
    I have an event site with 3 weblogs:

    1. Cities (basic info where the entry TITLE is the city)
    2. Events (a few custom fields)
      The events weblog has a bunch of event categories (e.g. music, culinary, etc)
    3. Venues (a few custom fields)
      The venues weblog has a bunch of venue categories (e.g. theatre, park, etc)

    (There are a few relationship fields to the cities weblog from the other two so that if you were to view a ‘city’ you would see all related events and venues for that city)

    What I need to do is create a mini search bar in the header that allows you to choose
    1. The city (from cities weblog title)
    2. The event category (from events weblog categories)
    3. A date (from events weblog entry date)
    >> after hitting the ok button, all entries with the chosen criteria should display

    I got the event category drop down to work from one of the wiki entries, but the other two I cannot for the life of me get my head around.

    Yikes, I’m totally lost - any help in the right direction would be immensely aprecciated - thank you!

    spArkle

  • #2 / Dec 05, 2008 4:48pm

    sparkle

    13 posts

    I though I would attach an image to try to help with explaining what I’m trying to do - not even sure if it’s possible at this point :( :(

    Thank you

  • #3 / Dec 09, 2008 9:39pm

    sparkle

    13 posts

    Hmmmm - I have to say I’m very surprised that no one has replied at all to my questions - I thought perhaps someone would at least point me in the right direction… I’m totally at a loss and really would love a little bit of help…???

    Perhaps this is something I need to offer $$ for?

  • #4 / Dec 19, 2008 1:03am

    sparkle

    13 posts

    Friendly *bump* Please pretty please - any advice from anyone??
    Thank you??

  • #5 / Dec 19, 2008 9:08am

    Peter Lewis

    280 posts

    Are you trying to make each relevant to the previous - so that only categories relevant to the city are listed, or dates relevant to the category?  If that’s the case, I can only think you’ll need Ajax to pulldown the relevant list at each stage.

    Otherwise, is it something like this:

    <form name="SearchBar" action="" method="get">
        <select>
            <option value="">Select a City</option>
    {exp:weblog:entries weblog="cities"}
            <option value="{title}">{title}</option>
    {/exp:weblog:entries}
        </select>
        <select>
            <option value="">Select a Category</option>
    {exp:weblog:categories weblog="events"}
            <option value="{category_url_title}">{category_name}</option>
    {/exp:weblog:entries}
        </select>
        <select>
            <option value="">Select a Date</option>
    {exp:weblog:entries weblog="events"}
            <option value="{entry_date}">{entry_date format="%Y %m %d"}</option>
    {/exp:weblog:entries}
        </select>
    </form>

    Then you’ll need to submit the form either on selection of the last pulldown, all pulldowns having a value, or creating a button to trigger submit.

  • #6 / Dec 19, 2008 12:37pm

    sparkle

    13 posts

    Oh my gosh, thank you SO much for your reply - you’ve given me hope 😉  I’ll try your suggestion and post my results.

    Thanks again, I appreciate your help 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases