From: Steve Sutton Date: Tue, 1 Dec 2015 20:41:43 +0000 (-0500) Subject: Update to fix first form part X-Git-Tag: vt0.1.0^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f9c83c45529751d127085f48e96211cd651661c5;p=WP-Plugins%2Fstaffords-employment.git Update to fix first form part Need different varliable names. Was stomping on it. --- diff --git a/controllers/front.php b/controllers/front.php index 17f069c..5a4c33a 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -154,6 +154,7 @@ class staffords_employment_front } break; default: + echo '

Part default

'; unset($_SESSION['glmJobsApplication'], $_SESSION['glmJobsAppForm']); if ($jobId = filter_var($_REQUEST['job'], FILTER_VALIDATE_INT)) { $jobData = get_post($jobId); @@ -168,10 +169,10 @@ class staffords_employment_front $termArray[] = $term->name; } if ( !empty( $termArray ) ) { - foreach ( $form as $key => $formPart ) { - if ( is_array( $formPart[0] ) && $formPart[0]['name'] == 'location_preference' ) { + foreach ( $form as $key => $formPartSub ) { + if ( is_array( $formPartSub[0] ) && $formPartSub[0]['name'] == 'location_preference' ) { foreach ( $termArray as $termName ) { - foreach ( $formPart[0]['opts'] as $optkey => $option ) { + foreach ( $formPartSub[0]['opts'] as $optkey => $option ) { if ( $option['label'] == $termName ) { $form[$key][0]['opts'][$optkey]['checked'] = 'checked'; }