Move booking to another room when checkbox is active
Brought to you by:
jberanek
Dear Campbell,
I would like to move an existing booking to another room in the case a custom checkbox is checked during editing.
I try that using this formula in edit_entry_handler.php but nothing happens, the booking remains in the same room.
if (($booking['custom_checkbox']==1) && ($old_booking['room_id'] == 1))
{
$room_id = 22;
}
when
$old_booking = get_booking_info($id, FALSE);
What could be the problem?
Thank you in advance.
OK, now I solved, I have to use
$booking['room_id'] = 22;
Instead of
$room_id = 22;
Sorry.