addElement('text', 'positionTitle', ['label' => 'Position(s) Applying for', 'required' => true]); $this->addElement('date', 'startDate', ['label' => 'Date available to start', 'required' => true]); $this->addElement('numeric', 'salary', [ 'label' => 'Salary desired', 'required' => true, 'prepend' => '$', 'append' => '/year', 'precision' => 0, ]); $this->addElement('radio', 'availability', [ 'label' => 'Availability', 'multiOptions' => $this->getConfigArray('availabilityOptions'), 'separator' => '   ', 'required' => true, ]); $this->addElement('text', 'name', ['label' => 'Name', 'required' => true]); $this->addSubForm(new AddressForm(), AddressEntity::TYPE_MAILING); $this->addElement('ssn', 'ssn', [ 'label' => 'SSN', 'required' => true, ]); $this->addDiverLicenseElements(); $this->addElement('phone', 'mobilePhone', ['label' => 'Mobile Phone #', 'required' => true]); $this->addElement('phone', 'homePhone', ['label' => 'Home Phone #']); $this->addElement('email', 'email', ['label' => 'Email address', 'required' => true]); $this->addElement('text', 'militaryService', ['label' => 'Service or Branch']); $this->addElement('radio', 'militaryHonorableDischarge', [ 'label' => 'Honorable Discharge', 'multiOptions' => $this->getConfigArray('yesNoOptions'), 'separator' => '   ', ]); $this->addDisplayGroup(['militaryService', 'militaryHonorableDischarge'], 'military', ['legend' => 'Military']); return $this; } private function addDiverLicenseElements() { $this->addElement('text', 'dlNumber', ['required' => true]); $this->getElement('dlNumber')->removeDecorator('Label')->getDecorator('HtmlTag') ->setOption('tag', 'div') ->setOption('class', 'inline-block'); $this->addElement('select', 'dlState', [ 'multiOptions' => ['' => 'Select One'] + (array) (new Qs_Db_Table('DState'))->get4Select(), 'required' => true, ]); $this->getElement('dlState')->removeDecorator('Label')->getDecorator('HtmlTag') ->setOption('tag', 'div') ->setOption('class', 'inline-block'); $this->addElement('date', 'dlExpiration', ['required' => true]); $this->getElement('dlExpiration')->removeDecorator('Label')->getDecorator('HtmlTag') ->setOption('tag', 'div') ->setOption('class', 'inline-block'); $this->addDisplayGroup(['dlNumber', 'dlState', 'dlExpiration'], 'dl', [ 'decorators' => [ 'FormElements', ['DtDdWrapper', [ 'label' => 'DL Number / State / Exp', 'labelAttribs' => ['class' => 'required'], 'ddAttribs' => ['class' => 'row-inline-blocks'], ]], ], ]); return $this; } protected function _initBackgroundElements() { $this->addElement('radio', 'wasConvicted', [ 'label' => 'Have you been convicted of a felony in the past 10 years?', 'multiOptions' => $this->getConfigArray('yesNoOptions'), 'required' => true, 'separator' => '   ', ]); $this->addEducationElements(); $this->addFormerEmploymentElements(); $this->addElement('textarea', 'qualification', [ 'label' => 'Skills/Qualifications', 'description' => 'List any special skills and qualifications you have acquired from employment and other ' . 'experiences. Also state any additional information you feel may be helpful in considering your ' . 'application for employment.', 'required' => true, ]); $this->getElement('qualification')->getDecorator('Description')->setOption('placement', 'prepend'); return $this; } private function addEducationElements() { $name = 'education'; $options = [ 'name' => $name, 'label' => 'Education', 'labelAttribs' => ['class' => 'form_header'], 'defaults' => Qs_Array::get($this->_defaults, $name, []), 'orientation' => Table::ORIENTATION_VERTICAL, 'enabledHeaders' => false, 'startIndex' => 0, 'itemClass' => Form\Education\Row::class, 'itemOptions' => ['recordTypes' => $this->getConfigArray('educationInstitutionTypes')], 'sortable' => false, 'removable' => false, 'numerable' => false, 'fixedRows' => true, ]; $this->addSubForm(new Form\Education\Table($options), $name); return $this; } private function addFormerEmploymentElements() { $name = 'formerEmployments'; $options = [ 'name' => $name, 'label' => 'Former Employments', 'description' => 'Start with most recent and work backwards', 'labelAttribs' => ['class' => 'form_header'], 'defaults' => Qs_Array::get($this->_defaults, $name, []), 'orientation' => Table::ORIENTATION_VERTICAL, 'enabledHeaders' => false, 'startIndex' => 0, 'itemClass' => Form\FormerEmployment\Row::class, 'itemName' => 'Former Employment', 'itemsName' => 'Former Employments', 'sortable' => true, 'removable' => true, 'numerable' => false, ]; $table = new Table($options); $table->getDecorator('Description')->setOption('placement', 'prepend'); $this->addSubForm($table, $name); return $this; } protected function addDocumentElement() { $this->addElement('extendedFile', 'documents', ['label' => 'Application Documents', 'required' => true]); return $this; } protected function addReferencesTable() { $name = 'references'; $options = [ 'name' => $name, 'label' => 'References', 'labelAttribs' => ['class' => 'form_header'], 'defaults' => Qs_Array::get($this->_defaults, $name, []), 'orientation' => Table::ORIENTATION_HORIZONTAL, 'enabledHeaders' => true, 'startIndex' => 0, 'itemClass' => Form\References\Row::class, 'itemName' => 'Person', 'itemsName' => 'Persons', 'sortable' => false, 'removable' => true, 'numerable' => true, 'fixedRows' => false, ]; $this->addSubForm(new Table($options), $name); return $this; } protected function addRelationshipWithEmployersTable() { $name = 'relationshipWithEmployers'; $options = [ 'name' => $name, 'label' => 'Please disclose name and relationship of any family members currently employed with ' . $this->getConfig('companyName', constant('SITE_NAME')), 'labelAttribs' => ['class' => 'form_header'], 'defaults' => Qs_Array::get($this->_defaults, $name, []), 'orientation' => Table::ORIENTATION_HORIZONTAL, 'enabledHeaders' => true, 'startIndex' => 0, 'itemClass' => Form\Relationship\Row::class, 'itemName' => 'Person', 'itemsName' => 'Persons', 'sortable' => false, 'removable' => true, 'numerable' => true, 'fixedRows' => false, ]; $table = new Table($options); $table->getDecorator('Description')->setOption('placement', 'prepend'); $this->addSubForm($table, $name); return $this; } }