Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi grafityx,

    The plugin is designed to redirect to a bookings page you’ve set up on your site. Once you’ve created the page, go to Bookings > Settings and set the Booking Page. This will output the booking form in the main body of that page so that users see it.

    In order to use the current URL with just the #bottom tag, you’d need to either modify the form’s HTML output or modify the form’s action tag with some Javascript after the page has loaded.

    Thread Starter grafityx

    (@grafityx)

    Could you tell me the file name and line number to add #bottom tag ?

    If you modify the file itself, you’ll run into problems down the road when updating the plugin. Your changes will just get overwritten each time there’s an update to the plugin.

    The easiest way to do what you want without tampering with the files is to add a small snippet of JavaScript which sets the form’s action parameter when the page is loaded. Try something like this:

    jQuery(document).ready(function ($) {
    	$('.rtb-booking-form form').attr( 'action', '#bottom' );
    });

    That will reset the form’s action parameter to #bottom when the page is loaded. Then when the form is submitted, it will load the current url + #bottom.

    If you really want to modify the full HTML output, the recommended way is to hook into the rtb_booking_form_html_pre filter. This will allow you to hijack the form output and output your own. However, you should look at the full function rtb_print_booking_form() in wp-content/plugins/restaurant-reservations/includes/template-functions.php to make sure you’re handling errors passed to the form as well. You can see the code online here.

    If you use the Hooks API in this way, you’ll be able to apply updates to the plugin without overwriting your changes. However, if you insist on modifying the plugin’s files, you can do modify the rtb_print_booking_form() function. You’ll want to modify the form’s action tag on Line 80. Replace:

    <form method="POST" action="<?php echo esc_attr( $booking_page ); ?>">

    With:

    <form method="POST" action="#bottom">

    Thread Starter grafityx

    (@grafityx)

    Thanks i will try that 🙂

    I have another question I migrated my website to a new host but now i cannot get anymore notification on admin email but client can get …
    I’ve tried with another email is the same problem. I’ve checked the new host and all settings are ok …

    First, I’d check any spam filters or junk mail folders you have on the account to see if the emails are getting sorted into there. If you don’t find anything there, contact your web host to see if the emails are being blocked on their level. They should be able to check the mail logs to determine if an email is being sent out and may be able to tell you if there are special settings or conditions that are preventing it from working.

    Thread Starter grafityx

    (@grafityx)

    Just wanna inform you that the Javascript snippet works very well 🙂
    Many thanks

    jQuery(document).ready(function ($) {
    $(‘.rtb-booking-form form’).attr( ‘action’, ‘#bottom’ );
    });

    Glad to hear it!

    Wildcard

    (@thenewguy_14)

    Hi i have the same problem. I really just want to get rid of all the content on the page expect for the thank you message since i found that you can kick off conversion when the thank you message is shown. is there a way to achieve this.

    Wildcard

    (@thenewguy_14)

    Sorry disregard found your micro plugin

    thanks

    For others reading this thread, here is the micro plugin to handle this.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Redirect URL after booking request sent’ is closed to new replies.