function _rooms_booking_manager_setup_hidden_fields in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Set up hidden fields with information that is required throughout the form.
Parameters
$form:
$start_date:
$end_date:
$booking_parameters:
$b_units:
Return value
mixed
1 call to _rooms_booking_manager_setup_hidden_fields()
- book_units_per_type_form in modules/
rooms_booking_manager/ rooms_booking_manager.module - Book units per type booking form callback.
File
- modules/
rooms_booking_manager/ rooms_booking_manager.units_per_type_form.inc, line 20 - Helper functions to clear up the units per type form and make the logic easier to follow.
Code
function _rooms_booking_manager_setup_hidden_fields($form, $start_date, $end_date, $booking_parameters, $b_units) {
$form['start_date'] = array(
'#type' => 'hidden',
'#value' => $start_date,
);
$form['end_date'] = array(
'#type' => 'hidden',
'#value' => $end_date,
);
$form['booking_parameters'] = array(
'#type' => 'hidden',
'#value' => serialize($booking_parameters),
);
$form['info']['params']['b_units'] = array(
'#type' => 'hidden',
'#value' => check_plain($b_units),
);
return $form;
}