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
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