Shortcode booking form
[booking-form]
[booking-form location=5122]Code language: JSON / JSON with Comments (json)
**If you work with locations, then there is no main location anymore for the restaurant reservations plugin. So if you have a main and sub location, then you can only allow reservations for the sub location. If you also need reservations for the main location, then you need to create a sub location for that as well.**
Check confirm by default
If you edit the reservation to change the status to confirmed, it doesn’t send a confirmation unless you check the ‘Send notifications‘ box. Copy the below function in the child themes functions.php to have that box checkedby default.
// 5* restaurant reservations, edit reservations send message box
checked by default
function rtb_switch_admin_notification_field_callback( $fields,
$request ) {
$fields['admin']['fields']['notifications']['request_input']
= true;
return $fields;
}
add_filter( 'rtb_booking_form_fields',
'rtb_switch_admin_notification_field_callback', 21, 2 );Code language: PHP (php)
Style the reservation form
/*-- START Restaurant Reservations --*/
header#main-header {
z-index: 9998;
}
.picker__frame {
z-index: 99999;
}
fieldset.contact, fieldset.reservation {
float: left;
width: 47%;
}
fieldset.reservation {
margin-right:50px;
}
.rtb-text.email, .rtb-text.phone {
display: inline-block;
width: 48.1%;
}
.rtb-text.email {
margin-right: 10px;
}
.rtb-booking-form input, .rtb-booking-form .message textarea {
max-width: 100%!important;
border-color: #df5503 !important;
border-radius: 5px !important;
background-color: #F4F6F1 !important;
}
.rtb-booking-form input, select#rtb-party {
padding: 12px;
font-size: 14px;
border-color: #df5503 !important;
border-radius: 5px !important;
background-color: #F4F6F1 !important;
}
select {
border-radius: 5px !important;
}
select#rtb-party {
height: 45px;
line-height: 40px;
width: 100%;
border-radius: 5px !important;
border: 1px solid #df5503 !important;
outline: 0 solid #bbb;
outline-offset: -1px;
border-color: #df5503 !important;
background-color: #F4F6F1 !important;
}
.rtb-booking-form legend {
padding: 0!important;
text-transform: uppercase;
font-size: 22px;
color: #df5503 !important;
}
.rtb-booking-form fieldset {
margin-bottom: 2em!important;
}
.add-message a {
display: inline!important;
}
.rtb-textarea {
position: relative;
top: auto;
left: auto;
}
.rtb-booking-form .rtb-error {
background: #C10C0C!important;
}
.rtb-booking-form button {
font-family: inherit;
bottom: 0;
color: #ffffff;
border: 3px solid #df5503;
border-radius: 5px !important;
letter-spacing: 0;
font-size: 24px;
text-transform: uppercase !important;
display: block!important;
width: 100%!important;
height: 58px!important;
padding: 0.5em 0 !important;
text-align: center!important;
-moz-transition: all 0.4s ease-in-out;
-webkit-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
margin-top: 25px;
background: #df5503;
}
.rtb-booking-form button:hover {
color: #df5503 !important;
background: rgba(239,242,235,0) !important;
border-color: #df5503 !important;
border-radius: 5px;
letter-spacing: 0;
}
.picker__list-item {
padding: .5em 0;
font-size: 15px;
display: inline-block;
width: 24.8%;
text-align: center;
border-bottom: 0 !important;
}
.picker--time .picker__frame, .picker--opened .picker__frame {
max-width: 50%!important;
top: 25%!important;
}
.picker--focused .picker__list-item--disabled, .picker__list-item--disabled, .picker__list-item--disabled:hover {
display: none;
}
.picker__day--highlighted {
border-color: #fff!important;
}
.picker__button--today:before {
border-top-color: #df5503!important;
}
.picker__day--today:before {
border-top-color: #fff!important;
}
.picker__day--highlighted:hover, .picker__day--infocus:hover, .picker__day--outfocus:hover, .picker__list-item:hover {
background: #fff!important;
-webkit-box-shadow: inset 0 0 0 3px #df5503;
-moz-box-shadow: inset 0 0 0 3px #df5503;
box-shadow: inset 0 0 0 3px #df5503;
border: 0!important;
}
.picker__button--clear:hover, .picker__button--close:hover, .picker__button--today:hover, .picker__nav--next:hover, .picker__nav--prev:hover {
background: #ddd!important;
-webkit-box-shadow: inset 0 0 0 3px #ddd;
-moz-box-shadow: inset 0 0 0 3px #ddd;
box-shadow: inset 0 0 0 3 #ddd;
}
.picker__day--selected, .picker__day.picker__day--infocus.picker__day--today:hover, .picker--focused .picker__day--highlighted, .picker__day.picker__day--infocus.picker__day--selected.picker__day--highlighted:hover, .picker__list-item--highlighted, li.picker__list-item.picker__list-item--selected.picker__list-item--highlighted.picker__list-item--viewset:hover, li.picker__list-item.picker__list-item--highlighted.picker__list-item--viewset:hover {
background: #df5503!important;
color: #fff!important;
border: 1px solid #df5503;
}
input:focus, textarea:focus, select:focus {
border-color: #df5503!important;
color: #3e3e3e!important;
}
.rtb-booking-form input:disabled {
background-color: #f7f7f7 !important;
border-color: #a1a1a1 !important;
}
@media only screen and (min-width: 782px) and (max-width: 1392px) {
fieldset.contact, fieldset.reservation {
width: 46%;
}
}
@media only screen and (max-width: 782px) {
fieldset.contact, fieldset.reservation {
width: 100%;
}
}
/*-- END Restaurant Reservations --*/Code language: CSS (css)
Update version 2.8
Date and time field are disabled when no party size is selected. This may need the following styling to make it more clear.
.rtb-booking-form input:disabled {
background-color: #dfdfdf;
border-color: #a1a1a1;
}Code language: CSS (css)
Bulk delete all old reservations
Use this plugin https://en-gb.wordpress.org/plugins/bulk-delete/
- Delete by post type
- Booking (rtb-booking)