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