Submit event from the frontend
-
Hello,
I am using the plugin to develop my website and I am using Chrome.
I had an issue with the Preview event panel when creating an event with the frontend.
When I clicked on the button “Submit Listing”, the page was redirected to the form for entering the event information.
And the status of the event stayed in “Preview” state, instead of “Pending” or “Published”.I used the code inspector to understand the request send to the server when I pressed “Submit Listing”, and I found out that in the post request only the value of the button was send to the server.
It was missing the following parameters: event_id=308, step=1 and event_manager_form=submit-event.It seems than Chrome has an issue with the <div></div> tags inside the <form></form> tags.
So I modified the file event-preview.php to put the <form></from> tags inside the <div></div>
Please find hereafter the modification done on the file event-preview.php
<div class="event_listing_preview_title"> <form method="post" id="event_preview" action="<?php echo esc_url( $form->get_action() ); ?>"> <input type="submit" name="continue" id="event_preview_submit_button" class="button event-manager-button-submit-listing" value="<?php echo esc_attr( apply_filters( 'submit_event_step_preview_submit_text', __( 'Submit Listing →', 'wp-event-manager' ) ) ); ?>" /> <input type="submit" name="edit_event" class="button event-manager-button-edit-listing" value="<?php esc_attr_e( '← Edit listing', 'wp-event-manager' ); ?>" /> <h2><?php esc_html_e( 'Preview', 'wp-event-manager' ); ?></h2> <input type="hidden" name="event_id" value="<?php echo esc_attr( $form->get_event_id() ); ?>" /> <input type="hidden" name="step" value="<?php echo esc_attr( $form->get_step() ); ?>" /> <input type="hidden" name="event_manager_form" value="<?php echo esc_attr( $form->get_form_name() ); ?>" /> </form> </div> <div class="event_listing_preview single_event_listing"> <?php get_event_manager_template_part( 'content-single', 'event_listing' ); ?> </div>
The topic ‘Submit event from the frontend’ is closed to new replies.