From f951c6bc9b3ba5f8a287c6c5351ab149065a7537 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Mon, 26 Jun 2017 22:18:34 +1000 Subject: [PATCH] add form elements --- booking.regn_form.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/booking.regn_form.inc b/booking.regn_form.inc index af70e76..af76ba1 100644 --- a/booking.regn_form.inc +++ b/booking.regn_form.inc @@ -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 : '' ); }