booking form in bespoke template

This topic contains 7 replies, has 3 voices, and was last updated by  Stephen Harris 9 years, 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #21197

    I’m setting up a new single-event template and all works well except the booking form

    the booking form shows if I leave it in the_content, but when I use the prescribed filter to turn off the default booking form I can’t get it to show. The function eo_get_booking_form() refuses to show anything; I can add the shortcode to the event text (this shows the span coding in the email field if not logged in)

    I’m running the latest version pro 1.11.4

    Any ideas

    Barry Meadows
    #21199

    Hi Barry,

    How are you using the function?

    Stephen Harris
    #21200

    I’m using theeo_get_booking_form() function

    Barry Meadows
    #21223

    I am also interested in this answer. I used the function like in below within a template but it did not display the booking form.

    <?php eo_get_booking_form()?>
    
    Bond Nwonye
    #21224

    Here’s an updated way I used the function. I included an ending semi-colon before he closing tag. Did not display the form.

    
    <?php eo_get_booking_form();?>
    
    Bond Nwonye
    #21225

    @Barry Meadows,

    Happy to say I found where Stephen answered this question elsewhere and applied the solution, which worked for me. Here is the low down:

    First you need to add this filter to your functions.php file

    add_filter( 'eventorganiser_pro_get_option_disable_automatic_form', '__return_true' );
    

    Then you need to add this function call to the template area where you want to display the booking form:

    echo eo_get_booking_form( get_the_ID() );
    

    Remember to wrap the function call within opening and closing php tags. Below is the link to where Stephen answered this question for someone else. Scroll down until you see “In reply to: Bookings: Default ticket for all; Adding booking form to template”.

    Hope this helps.

    http://wp-event-organiser.com/forums/search/booking+form/page/4/?bbp_search=booking%20form

    Bond Nwonye
    #21226

    Many thanks for your help
    Even though this is exactly what I had already done, with your guidance it worked this time – don’t know what the difference is.

    many thanks

    Barry

    Barry Meadows
    #21250

    Hi Barry / Bond,

    Just to build upon Bond’s last post: eo_get_booking_form() only returns the HTML mark-up for the form. You need the echo to print it:

    <?php echo eo_get_booking_form( get_the_ID() ); ?>
    

    Without the echo the form will not appear.

    Stephen Harris
Viewing 8 posts - 1 through 8 (of 8 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.