From 49ee2846a2811ce5d85938a9611ad27e945006e6 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 29 Jun 2017 16:13:21 +1000 Subject: [PATCH] bugfix --- booking.regn_form.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/booking.regn_form.inc b/booking.regn_form.inc index 594772c..aadc330 100644 --- a/booking.regn_form.inc +++ b/booking.regn_form.inc @@ -106,7 +106,7 @@ function booking_form($node, &$form_state, $inserting = FALSE, $early_access_all // ------- form starts here --------- //add new feature for early registration access - if ($early_access_allowed) { + if ($inserting == TRUE && $early_access_allowed) { $form['early-access'] = array( '#type' => 'fieldset', '#title' => 'Early Registration Code' @@ -1255,7 +1255,7 @@ function booking_form_submit($form, &$form_state) $node->booking_skills_language_details = empty($values['booking_skills_language_details']) ? 'N/A' : $values['booking_skills_language_details']; $node->booking_skills_other = empty($values['booking_skills_other']) ? 'N' : ($values['booking_skills_other'] == 1 ? 'Y' : 'N'); $node->booking_skills_other_details = empty($values['booking_skills_other_details']) ? 'N/A' : $values['booking_skills_other_details']; - $node->booking_earlyaccess_code = empty($values['booking_earlyaccess_code']) ? '' : $earlyaccess_query->cid; + $node->booking_earlyaccess_code_id = empty($values['booking_earlyaccess_code']) ? '' : $earlyaccess_query->cid; //remove newlines from these fields so the CSV output doesn't get messed up $medical = empty($values['booking_medical_conditions']) ? 'N/A' : $values['booking_medical_conditions'];