Hi Angelo, thanks for getting back to me… I manage to do by copying the em_event_form() function code from em-template-tags.php lines 178 – 213 to my theme function.php I made slight changes to the code reversing the if (empty()) to if (!empty()) and it works! I have left the code below for anyone who needs similar setup just copy and paste into you theme function.php and call using em_event_form2() so now you can have both tags on one page…
Just one help please angelo after the person has submitted how can I redirect the user to the newly created post… if you can help I would be grateful.
Finally can anyone let me know if there is an issue or problem with the code changes I made below
//Event Forms - New
/**
* Outputs the event submission form for guests and members.
* @param array $args
*/
function em_event_form2($args = array()){
global $EM_Event;
if( get_option('dbem_css_editors') ) echo '<div class="css-event-form">';
if( !is_user_logged_in() && get_option('dbem_events_anonymous_submissions') && em_locate_template('forms/event-editor-guest.php') ){
em_locate_template('forms/event-editor-guest.php',true, array('args'=>$args));
}else{
if( empty($_REQUEST['success']) ){
$EM_Event = new EM_Event(); //reset the event
}
if( !empty($EM_Event->event_id) ){
$EM_Event = ( is_object($EM_Event) && get_class($EM_Event) == 'EM_Event') ? $EM_Event : new EM_Event();
//Give a default location & category
$default_cat = get_option('dbem_default_category');
$default_loc = get_option('dbem_default_location');
if( get_option('dbem_categories_enabled') && is_numeric($default_cat) && $default_cat > 0 && !empty($EM_Event->get_categories()->categories) ){
$EM_Category = new EM_Category($default_cat);
$EM_Event->get_categories()->categories[] = $EM_Category;
}
if( !is_numeric($default_loc) && $default_loc < 0 && ( !empty($EM_Event->get_location()->location_id) && !empty($EM_Event->get_location()->location_name) && !empty($EM_Event->get_location()->location_address) && !empty($EM_Event->get_location()->location_town) ) ){
$EM_Event->location_id = $default_loc;
$EM_Event->location = new EM_Location($default_loc);
}
}
em_locate_template('forms/event-editor.php',true, array('args'=>$args));
}
if( get_option('dbem_css_editors') ) echo '</div>';
}
/**
* Retreives the event submission form for guests and members.
* @param array $args
*/
function em_get_event_form2( $args = array() ){
ob_start();
em_event_form2($args);
return ob_get_clean();
}