Add maximum age restriction to registration form

This commit is contained in:
2015-03-18 11:53:52 +11:00
parent 034785d70c
commit 5aa285e9dc
4 changed files with 88 additions and 23 deletions

View File

@@ -74,12 +74,22 @@ function booking_admin() {
$form['attendee']['booking_max_dob'] = array (
'#type' => 'date_select',
'#title' => t('Maximum Date of Birth'),
'#description' => t("The most recent date of birth you wish to allow into the event."),
'#description' => t("The youngest date of birth you wish to allow into the event."),
'#default_value' => variable_get('booking_max_dob','1995-04-15 00:00:00'),
'#date_format' => 'd/m/Y',
'#date_label_position' => 'within',
'#date_year_range' => '-60:-10'
);
$form['attendee']['booking_min_dob'] = array (
'#type' => 'date_select',
'#title' => t('Minimum Date of Birth'),
'#description' => t("The oldest date of birth you wish to allow into the event."),
'#default_value' => variable_get('booking_min_dob','1995-04-15 00:00:00'),
'#date_format' => 'd/m/Y',
'#date_label_position' => 'within',
'#date_year_range' => '-60:-10'
);
$form['attendee']['booking_regn_limit'] = array (
'#type' => 'textfield',