Hi rickgrosso,
No, unfortunately there’s no way to do this at the moment without writing some code.
I saw you commented on that other support request. Possibly an easier technique you could use would be to overwrite the callback function in the $fields array to print a hidden time field with a dummy time value. You’d want to hook into the rtb_booking_form_fields filter.
Hi NateWr,
could you help with a “step by step” help? Like “overwrite the callback function in the $fields array to print a hidden time fiedl with a dummy time vaulue”. Thanks what I’d love to do: every single reservation is going to be at 7.30pm. How can I do that?
That’s would be very helpful!
Thanks so much.
Hi rickgrosso,
Here’s a bit of example code that shows how to hook in and modify the party’s callback function. You’d need to use the same principle to modify the time field by changing this line:
$fields['reservation']['fields']['party']['callback'] == '__return_false';
To this:
$fields['reservation']['fields']['time']['callback'] == 'rickgrosso_custom_date';
That tells the plugin to call your own custom function, rickgrosso_custom_date(), when it wants to print the time field. So just create your own custom function with that name that prints a hidden value:
function rickgrosso_custom_date( $slug, $title, $value, $args = array() ) {
echo '<input type="hidden" name="rtb-' . $slug . '" value="7:30 PM">';
}
I haven’t tested that code but it should give you a rough idea of what you want to do. There may be some knock-on problems with the time picker, but I’m not sure.