WordPress.org

Ready to get started?Download WordPress

Forums

Events Made Easy
[resolved] Dropdown for locations (5 posts)

  1. dutchpuzzle
    Member
    Posted 7 months ago #

    I am using dropdown filters with the EME plugin on my website. Today I have updated both WP and the EME plugin to the latest versions. The default option on 3 of my 4 filters correctly says "Select a Category", "Select a location" and "Select Month" however, the other option which should say "Select County" has the first County in my list as the default option. At the bottom of the list of Counties, there is a blank white space which, when selected, includes all counties in the list.

    How do I change it to the default required: "Select County" at the top of the list?

    http://www.herefordequestrian.co.uk/whats-on/

    Thank you

    http://wordpress.org/plugins/events-made-easy/

  2. Franky
    Member
    Plugin Author

    Posted 7 months ago #

    It's "Select a town", not "Select County". But still: it should be there.
    Could you check if the file eme_filters.php contains the text "Select a town" ? If not, somehow your update failed (maybe file permissions).

  3. dutchpuzzle
    Member
    Posted 7 months ago #

    Yes, "Select a town" is included in the file

  4. dutchpuzzle
    Member
    Posted 7 months ago #

    Here is a snippet from eme_filters.php

    asort($town_list);
    if ($multiple) {
    $town_list = array(0=>__('Select one or more towns','eme'))+$town_list;
    $replacement = eme_ui_multiselect($selected_town,$town_post_name,$town_list,$multisize);
    } else {
    $town_list[0] = array(0=>__('Select a town','eme'))+$town_list;
    $replacement = eme_ui_select($selected_town,$town_post_name,$town_list);
    }

    We have altered this to:

    asort($town_list);
    if ($multiple) {
       $town_list = array(0=>__('Select one or more towns','eme'))+$town_list;
       $replacement = eme_ui_multiselect($selected_town,$town_post_name,$town_list,$multisize);
    } else {
       $town_list = array(0=>__('Select a town','eme'))+$town_list;
       $replacement = eme_ui_select($selected_town,$town_post_name,$town_list);
    }

    This is now working correctly so is this a typo or a bug?

  5. Franky
    Member
    Plugin Author

    Posted 7 months ago #

    It took me a while to see the difference, but I overlooked it since it is already fixed in the dev version:

    * Bugfix: default selected town was always the first town when using [events_filterform]

    It will be in the next version, to be released asap.

Reply

You must log in to post.

About this Plugin

About this Topic