function uc_select_day in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_store/uc_store.module \uc_select_day()
- 7.3 uc_store/uc_store.module \uc_select_day()
Creates a day select box for a form.
2 calls to uc_select_day()
- uc_payment_method_cod_form in payment/
uc_payment_pack/ uc_payment_pack.module - Form to collect additional information needed by the "Cash on Delivery" payment method.
- uc_payment_pack_receive_check_form in payment/
uc_payment_pack/ uc_payment_pack.admin.inc - Receives a check for an order and put in a clear date.
File
- uc_store/
uc_store.module, line 1382 - Contains global Ubercart functions and store administration functionality.
Code
function uc_select_day($title = NULL, $default = NULL, $allow_empty = FALSE) {
$options = $allow_empty ? array(
'' => '',
) : array();
$select = array(
'#type' => 'select',
'#title' => is_null($title) ? t('Day') : $title,
'#options' => $options + drupal_map_assoc(range(1, 31)),
'#default_value' => is_null($default) ? 0 : $default,
);
return $select;
}