Support » Plugin: Events Manager » Locations Drop Down – Select option

  • Resolved ddrj

    (@ddrj)


    In settings/General/Location settings I have:

    Require locations for events?
    and
    Use dropdown for locations?

    both set to yes.

    The location dropdown displays correctly but there is no select option – thus the first location in the list is automatically selected if no other location is selected. This clearly bypasses the Require locations function.

    I have searched the documentation and the forums without success – where and how do I add a select option to the locations dropdown.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ddrj

    (@ddrj)

    If I select no for Require Locations for events ? – The Locations dropdown displays a No location option at the top of the dropdown. However the location requirement no longer works i.e the event can be listed without a location.

    So how do I get both the No location in the dropdown and the requirement that the location is selected ?

    Add this to your functions.php:

    function stonehenge_em_add_empty_location() {
    	?><script>
    	jQuery.noConflict();
    		jQuery(document).ready(function() {
    		jQuery("#location-select-id").prepend("<option value='' disabled selected='selected'>-- SELECT -- </option>");
    	});
    	(jQuery);
    	</script><?php
    }
    add_action('admin_footer', 'stonehenge_em_add_empty_location', 15); // WP Admin.
    add_action('wp_footer', 'stonehenge_em_add_empty_location', 15); // Front-end Submission form.
    Thread Starter ddrj

    (@ddrj)

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Locations Drop Down – Select option’ is closed to new replies.