Default to creating new location when adding event

WordPress Event Management, Calendars & Registration Forums General Question Default to creating new location when adding event

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 6 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30459

    Hi Stephen,
    I’m working on a client project for an outdoors/walking group. I intend to use Event Organiser to list all of the different walks, with the “venue” used to indicate the start point.
    Clearly this can already be done – but from a usabiltiy point of view it would be great if there was a way to bypass the venue lookup, and automatically show the “add new venue” form when creating a new event. (In this use-case the likelyhood of a start point “venue” being duplicated is minimal, and it is not of any real significance if the venues are duplicated)
    Also in relation to adding new venues via the new event form – would it be possible to allow editing of the precise venue location via the map here, in the same way it can be done on the edit venue pages? I often find that the geolocation for a given address is not quite right, and I then have to go and find the new venue to correct it – things would be so much easier if it could all be done in the one place.

    Owen Morris
    #30482

    Hi Owen,

    This is possible with this code snippet:

    add_action( 'eventorganiser_get_fes_form', function($form){
        foreach( $form->flatten_elements() as $element ){
            if($element->get_type() == 'event_venue' && false === $element-get_value('venue_id')) {
                $element->set_value(-1,'venue_id');
            }
        }
    });
    

    I’ll look into the feasibility of allowing the marker to be dragged on the front-end.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.