You are here

function rooms_booking_children_discount_submit in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Submit callback for rooms_booking_children_discount form.

File

modules/rooms_booking/rooms_booking.module, line 236
Manage Bookings - Bookings are tied to a customer profile and possible a Unit ID and Order ID.

Code

function rooms_booking_children_discount_submit($form, &$form_state) {
  $options = array();
  for ($i = 1; $i <= $form_state['num_options']; $i++) {
    $options[$i] = array(
      'start' => $form_state['values']['option'][$i]['start'],
      'end' => $form_state['values']['option'][$i]['end'],
      'discount' => $form_state['values']['option'][$i]['discount'],
    );
  }
  variable_set('rooms_children_discount_options', $options);
}