add form elements
This commit is contained in:
@@ -119,10 +119,21 @@ function booking_form($node, &$form_state, $inserting = FALSE)
|
||||
// ------- form starts here ---------
|
||||
|
||||
//add new feature for early registration access
|
||||
if ($inserting == TRUE && variable_get('booking_enable_earlyaccess_codes', 1) == 1) {
|
||||
if ($inserting == TRUE && variable_get('booking_enable_earlyaccess_codes', 0) == 1) {
|
||||
$form['early-access'] = array(
|
||||
'#type' => 'fieldset',
|
||||
'#title' => 'Early Registration Code'
|
||||
);
|
||||
$form['early-access']['booking_earlyaccess_explanation'] = array(
|
||||
'#type' => 'container',
|
||||
'#children' => "If you have been given an early access code for registration, please enter it below. Note that this code can only be used once, so don't pass it along to your friends!",
|
||||
);
|
||||
$form['early-access']['booking_regn_earlyaccess_code'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Unique Early-Access Code'),
|
||||
'#maxlength' => 45,
|
||||
'#required' => TRUE,
|
||||
'#default_value' => !empty($data->booking_regn_earlyaccess_code) ? $data->booking_regn_earlyaccess_code : ''
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user