From: Steve Sutton Date: Fri, 8 May 2015 20:47:53 +0000 (-0400) Subject: Make first sect of field in past jobs required X-Git-Tag: vv1.0.6^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=2fc8c94cde2be0b2cbad7af9a4e8199c03fb3a94;p=WP-Plugins%2Fglm-employment.git Make first sect of field in past jobs required They are getting ones with nothing entered --- diff --git a/config/settings3.php b/config/settings3.php index a009279..d516e8d 100644 --- a/config/settings3.php +++ b/config/settings3.php @@ -10,7 +10,12 @@ $topHeader = [ . '§391.21(b)(10),(11). All Applicants: start with last, or current' . ' position, and work back.' ]; -$titles = array_combine(range(1, 4), range(1, 4)); +$titles = [ + 1 => '', + 2 => '2', + 3 => '3', + 4 => '4' +]; $employment_titleHdr = [ 'type' => 'static', 'label' => ' ', @@ -67,60 +72,65 @@ for ($i = 1; $i <= 4; ++$i) { 'type' => 'text', 'name' => 'employment_dates_from'.$i, 'placeholder' => 'From:', + 'req' => ($i == 1) ? true: false, 'grid' => 2 ]; ${'employment_dates_to'.$i} = [ 'type' => 'text', 'name' => 'employment_dates_to'.$i, 'placeholder' => 'To:', + 'req' => ($i == 1) ? true: false, 'grid' => 2 ]; ${'employment_info'.$i} = [ 'type' => 'text', 'name' => 'employment_info'.$i, -// 'placeholder' => ' ', + 'req' => ($i == 1) ? true: false, 'grid' => 4 ]; ${'employment_supervisor'.$i} = [ 'type' => 'text', 'name' => 'employment_supervisor'.$i, 'placeholder' => 'Supervisor', + 'req' => ($i == 1) ? true: false, 'grid' => 4 ]; ${'employment_salary_start'.$i} = [ 'type' => 'text', 'name' => 'employment_salary_start'.$i, 'placeholder' => 'Starting', + 'req' => ($i == 1) ? true: false, 'grid' => 1 ]; ${'employment_salary_end'.$i} = [ 'type' => 'text', 'name' => 'employment_salary_end'.$i, 'placeholder' => 'Ending', + 'req' => ($i == 1) ? true: false, 'grid' => 1 ]; ${'employment_position'.$i} = [ 'type' => 'text', 'name' => 'employment_position'.$i, -// 'label' => ' ', + 'req' => ($i == 1) ? true: false, 'grid' => 2 ]; ${'employment_position_sub'.$i} = [ 'type' => 'static', 'name' => 'employment_position_sub'.$i, -// 'label' => ' ', + 'req' => false, 'grid' => 2 ]; ${'employment_reason'.$i} = [ 'type' => 'text', 'name' => 'employment_reason'.$i, -// 'label' => ' ', + 'req' => ($i == 1) ? true: false, 'grid' => 2 ]; ${'employment_reason_sub'.$i} = [ 'type' => 'static', 'name' => 'employment_reason_sub'.$i, -// 'label' => ' ', + 'req' => false, 'grid' => 2 ]; }