function rooms_booking_manager_forms in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Implements hook_forms().
We use this to be able to show a different purchase button for each choice.
File
- modules/
rooms_booking_manager/ rooms_booking_manager.module, line 801 - Rooms Booking Manager brings together all the pieces required to find a room and book it - including the DrupalCommerce integration
Code
function rooms_booking_manager_forms($form_id, $args) {
$forms = array();
if (strpos($form_id, 'book_unit_form_') === 0) {
$forms[$form_id] = array(
'callback' => 'book_unit_form_builder',
);
}
elseif (strpos($form_id, 'rooms_booking_availability_search_form_') === 0) {
$forms[$form_id] = array(
'callback' => 'rooms_booking_availability_search_form_builder',
);
}
return $forms;
}