Menu

#2758 Move booking to another room when checkbox is active

None
closed
nobody
None
1
2023-05-21
2023-05-20
Gramanox
No

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.

Discussion

  • Gramanox

    Gramanox - 2023-05-21

    OK, now I solved, I have to use

    $booking['room_id'] = 22;

    Instead of
    $room_id = 22;

    Sorry.

     
  • Campbell Morrison

    • status: open --> closed
    • Group: -->