public function buildForm()
 {
     $this->add('exam_id', 'select', ['choices' => Exam::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Exam :', 'attr' => ['required']]);
     $this->add('board_id', 'select', ['choices' => Board::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Board/university :', 'attr' => ['required']]);
     $this->add('subject_id', 'select', ['choices' => Subject::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Subject/Trade :', 'attr' => []]);
     $this->add('specialization', 'text', ['attr' => ['maxlength' => '50', 'placeholder' => 'Specialization if any e.g. biology/chemistry'], 'label' => 'Specialization']);
     // $this->add('pass_year', 'text', [
     //     'attr' => ['maxlength' => '4', 'placeholder'=> 'year of passing'],
     //     'label' =>  'Pass Year'
     // ]);
     $this->add('pass_year', 'text', ['attr' => ['maxlength' => '4', 'placeholder' => 'year of passing'], 'label' => 'Pass Year']);
     $this->add('percentage', 'text', ['attr' => ['maxlength' => '5', 'placeholder' => 'Percentage of marks'], 'label' => 'Percentage']);
     $this->add('save', 'submit', ['attr' => ['class' => 'btn btn-default btn-blue btn-lg']]);
     $this->add('update', 'submit', ['attr' => ['class' => 'btn btn-lg btn-success col-md-12']]);
 }
 public function buildForm()
 {
     $this->add('post_name', 'text', ['attr' => ['required', 'maxlength' => '255', 'placeholder' => 'name of the POST', 'title' => 'name of the position'], 'wrapper' => ['class' => 'form-group-sm col-md-5']]);
     $this->add('no_of_post', 'number', ['attr' => ['required', 'maxlength' => '3', 'placeholder' => 'no of vacancy', 'title' => 'total position vacant'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('industry_id', 'select', ['choices' => IndustryType::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'attr' => ['required'], 'label' => 'Industry :', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('place_of_employment_state_id', 'select', ['choices' => State::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Place of Employment State', 'attr' => ['required', 'id' => 'place_of_employment_state_id'], 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $districts = ['' => '-- Select State first--'];
     $this->add('place_of_employment_district_id', 'select', ['choices' => $districts, 'label' => 'District', 'attr' => ['required', 'id' => 'place_of_employment_district_id', 'required'], 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     // ->add('some_choices', 'choices', [
     //            'choices' => $this->getData('post_choices')     // When form is created passed as ->setData('post_choices', ['some' => 'array'])
     //        ])
     $this->add('place_of_employment_city', 'text', ['attr' => ['maxlength' => '255', 'placeholder' => 'City'], 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('salary_offered_min', 'text', ['attr' => ['required', 'maxlength' => '8', 'placeholder' => 'salary offered min'], 'wrapper' => ['class' => 'form-group-sm col-md-4'], 'label' => 'Salary Offered Min. (monthly)']);
     $this->add('salary_offered_max', 'text', ['attr' => ['required', 'maxlength' => '8', 'placeholder' => 'salary offered max'], 'wrapper' => ['class' => 'form-group-sm col-md-4'], 'label' => 'Salary Offered Max. (monthly)']);
     $this->add('other_benefits', 'text', ['attr' => ['maxlength' => '8', 'placeholder' => 'salary other_benefits'], 'wrapper' => ['class' => 'form-group-sm col-md-4'], 'label' => 'Other Benefits (annual)']);
     $this->add('preferred_age_min', 'number', ['attr' => ['required', 'maxlength' => '2', 'placeholder' => 'preferred_age_min', 'min' => "15", 'max' => "99"], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('preferred_age_max', 'number', ['attr' => ['required', 'maxlength' => '2', 'placeholder' => 'preferred_age_max', 'min' => "15", 'max' => "99"], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $casts = ['ANY' => 'ANY'] + Caste::lists('name', 'id')->all();
     $this->add('preferred_caste', 'select', ['choices' => $casts, 'empty_value' => '==== Select ===', 'label' => 'Preferred Caste', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     // $relegions = ['ANY'=>'ANY','BUDDHISM'=>'BUDDHISM', 'CHRISTIANITY'=>'CHRISTIANITY','HINDUISM'=>'HINDUISM','ISLAM'=>'ISLAM',
     //     'JAINISM'=>'JAINISM','PARSI'=>'PARSI','SIKHISM'=>'SIKHISM', 'OTHERS'=>'OTHERS',
     // ];
     // $this->add('preferred_relegion', 'select', [
     //         'choices' => $relegions,
     //         'empty_value' => '==== Select ===',
     //         'label' => 'Preferred Relegion',
     //         'attr' => ['required'],
     //         'wrapper' => ['class' => 'form-group-sm col-md-3'] // Shows the wrapper default is false
     // ]);
     $job_sub_categories = ['Govt. Regular' => 'Govt. Regular', 'Govt. Contractual' => 'Govt. Contractual', 'Pvt. Regular' => 'Pvt. Regular', 'Pvt. Contractual' => 'Pvt. Contractual', 'Not Specified' => 'Not Specified'];
     $this->add('job_sub_category', 'select', ['choices' => $job_sub_categories, 'empty_value' => ' ==== Select === ', 'label' => 'Job Category', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $genders = ['ANY' => 'ANY', 'MALE' => 'MALE', 'FEMALE' => 'FEMALE', 'OTHERS' => 'OTHERS'];
     $this->add('preferred_sex', 'select', ['choices' => $genders, 'empty_value' => '==== Select ===', 'label' => 'Preferred Sex', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $job_types = ['Full Time' => 'Full Time', 'Part Time' => 'Part Time'];
     $this->add('job_type', 'select', ['choices' => $job_types, 'empty_value' => '-- Select --', 'label' => 'Job Type', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-2']]);
     $this->add('exam_passed_id', 'select', ['choices' => Exam::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Exam Passed :', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('subject_id', 'select', ['choices' => Subject::lists('name', 'id')->all(), 'empty_value' => '--- Select ---', 'label' => 'Subject/Trade :', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('specialization', 'text', ['attr' => ['maxlength' => '50', 'placeholder' => 'specialization'], 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('preferred_experience', 'number', ['attr' => ['maxlength' => '2', 'placeholder' => 'preferred years of expereince'], 'wrapper' => ['class' => 'form-group-sm col-md-2']]);
     $this->add('ex_service', 'select', ['choices' => ['YES' => 'YES', 'NO' => 'NO'], 'empty_value' => '--- Select ---', 'label' => 'Ex-serviceman', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('physical_challenge', 'select', ['choices' => ['YES' => 'YES', 'NO' => 'NO'], 'empty_value' => '--- Select ---', 'label' => 'Physically Challenged', 'attr' => ['required'], 'wrapper' => ['class' => 'form-group-sm col-md-3']]);
     $this->add('physical_height', 'text', ['attr' => ['maxlength' => '5', 'placeholder' => 'height in cm'], 'label' => 'Physical height', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('physical_weight', 'text', ['attr' => ['maxlength' => '5', 'placeholder' => 'weight in k.g.'], 'label' => 'Physical weight', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('physical_chest', 'text', ['attr' => ['maxlength' => '5', 'placeholder' => ' in cm'], 'label' => 'Physical Chest', 'wrapper' => ['class' => 'form-group-sm col-md-4']]);
     $this->add('description', 'textarea', ['attr' => ['maxlength' => '255', 'rows' => '3', 'placeholder' => 'additional note/details of the job'], 'wrapper' => ['class' => 'form-group col-md-12']]);
     $this->add('Submit', 'submit', ['attr' => ['class' => 'btn btn-lg btn-primary col-md-12']]);
     $this->add('update', 'submit', ['attr' => ['class' => 'btn btn-lg btn-success col-md-12']]);
 }