From: Steve Sutton Date: Thu, 7 Sep 2017 21:03:36 +0000 (-0400) Subject: Update for form validation checks X-Git-Tag: v1.0.5^2~7 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=8e170ded41f7c41221b012457bf3e4d949ec6fb3;p=WP-Themes%2Fcslewisfestival.git Update for form validation checks Need to use $GLOBALS for the reason array. --- diff --git a/registrations/registrations.php b/registrations/registrations.php index 330ba8d..4b966b1 100644 --- a/registrations/registrations.php +++ b/registrations/registrations.php @@ -375,7 +375,6 @@ if( $Action == "Step3" ) $v['rate_total'] = money( $charge ); // If this event needs attendees - if( $reg_data['need_attendees'] == 't' ) { @@ -393,7 +392,7 @@ if( $Action == "Step3" ) // If there's any problems change step back to 2 - Checkout Form - if( count($reason) > 0 ) + if( count($GLOBALS['reason']) > 0 ) $Action = "Step2"; else { @@ -553,7 +552,7 @@ if( $Action == "Step4" ) if( empty($ccname) ) add_reason( "Name on Card is required" ); - $status = SI_REG_STATUS_CC_PEND; // It's OK to set this here since we're not going to process anything unless there's no failure "$reason". + $status = SI_REG_STATUS_CC_PEND; // It's OK to set this here since we're not going to process anything unless there's no failure "$GLOBALS['reason']". } @@ -568,7 +567,7 @@ if( $Action == "Step4" ) if( isset($cc_reason) && $cc_reason != '' ) add_reason( $cc_reason ); - if( count($reason) > 0 ) + if( count($GLOBALS['reason']) > 0 ) $Action = "Step3"; } @@ -758,8 +757,8 @@ $v["this_day_of_month"] = $date_array["mday"]; $v["navigation"] = $nav; $v["form_data"] = $GLOBALS['form_data']; $v["link_data"] = $link_data; -$view_tags["reason"] = $reason; -$v['have_reason'] = ( count($reason) > 0 ? 'YES' : 'NO' ); +$view_tags["reason"] = $GLOBALS['reason']; +$v['have_reason'] = ( count($GLOBALS['reason']) > 0 ? 'YES' : 'NO' ); $v["problem"] = ""; $v["price_debug"] = ""; $v["next_step"] = "Step$next_step";