From 7dea27104ba42b59ddc3dc32e0a7078c5b764bcf Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Sat, 5 May 2018 21:30:29 +1000 Subject: [PATCH] fix hidden field in form --- booking.variety_admin.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/booking.variety_admin.inc b/booking.variety_admin.inc index e50225a..3ba8151 100644 --- a/booking.variety_admin.inc +++ b/booking.variety_admin.inc @@ -651,6 +651,12 @@ function booking_variety_regn_edit_form($node, &$form_state, $nid) $timeslot_result = $timeslot_query->execute(); // --- Form starts here --- + //add the person nid to the form in a hidden field so we can update the right person later + $form['nid'] = array ( + '#type' => 'hidden', + '#value' => $nid, + ); + //define the form for variety session configuration if we're not deleting a session if(!isset($form_state['storage']['confirm'])) { $form[] = array ( @@ -660,11 +666,7 @@ function booking_variety_regn_edit_form($node, &$form_state, $nid) ), ); - //add this to the form in a hidden field so we can update the right event - $form['nid'] = array ( - '#type' => 'hidden', - '#value' => $nid, - ); + $form['variety-sessions'] = array( '#type' => 'fieldset', @@ -703,7 +705,7 @@ function booking_variety_regn_edit_form($node, &$form_state, $nid) ); } //end checking for delete confirmation else { - return confirm_form($form, "Are you sure you wish to delete all variety session registrations for id " . $nid . "?", + return confirm_form($form, "Are you sure you wish to delete all variety session registrations for person id " . $nid . "?", current_path(), NULL, "Delete Session"); } }