Support » Plugin: Events Manager » Remove ‘Region’ field on submit an event page.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Since is not a required field, you can simply hide it with css:

    .em-location-data-region {
        display: none;
    }

    Beautiful. I’ve been wondering the same thing ever since I installed EM.

    Patrick, where’s the practical place to insert that statement you provided? i.e. so it’s with other location code. Thanks.

    Thread Starter webfoleo

    (@webfoleo)

    Thank you so much @duisterdenhaag . I have been trying to figure this out for days. Thank you!!!!!

    @charliear place it in your ‘Custom CSS’ file. It should be in your theme options.

    I got it removed from sight on the front end Submit Your Event, thank you.
    For a while I got puzzled because as admin I am in the habit of working on Events through the dashboard where this tune up has no effect – then I woke up. 🙂

    so … while we are on the subject, is there a way to pre-load some of the fields with consistent values? Two that will not change for me are the State/County should always be “ON” and the Country should always be “Canada”

    That would avoid members time and error typing in “Ontario” instead of “ON” because both ways are in daily use by people.

    Charlie.

    Have you looked at your settings??
    You can set the default country in the EM Settings. Easy, heh?

    Add this to your functions.php

    function stonehenge_em_modify_address_fields() {
    	?><script>
    jQuery.noConflict();
    jQuery(document).ready(function(){
    	jQuery('#location-state').val('ON');
    	jQuery('.em-location-data-region').hide();
    });
    (jQuery);
    	</script><?php
    }
    add_action('em_front_event_form_footer', 'stonehenge_em_modify_address_fields');
    add_action('admin_footer', 'stonehenge_em_modify_address_fields', 20);

    I chose to add another line in there to hide the Country so the form is now really cleaned up for the novice subscribers to use. No Region, No repetitive Country and the State (Province) is pre-filled.

    This function takes effect in the dashboard and on the front form which I really like. It was pasted into the functions.php of my child theme.

    Thanks again.
    Charlie

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove ‘Region’ field on submit an event page.’ is closed to new replies.