PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Services / Template / EntryLevelJobApplicationFormTemplate.php

EntryLevelJobApplicationFormTemplate.php in The Innovative Form Builder – IvyForms 1.5.1, at backend/src/Services/Template/EntryLevelJobApplicationFormTemplate.php

244 lines 8.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Services\Template;
4
5 use IvyForms\Services\Translations\BackendStrings;
6
7 class EntryLevelJobApplicationFormTemplate
8 {
9 /**
10 * Get template metadata (without form_data)
11 *
12 * @return array<string, mixed>
13 */
14 public static function getTemplateMeta(): array
15 {
16 return [
17 'id' => 'entry_level_job_application_form',
18 'name' => BackendStrings::getTemplateStrings()['entry_level_job_application_form'],
19 'description' => BackendStrings::getTemplateStrings()['entry_level_job_application_form_desc'],
20 'category' => 'application-forms',
21 'subcategory' => 'job-application-forms',
22 'is_pro' => false,
23 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'entry-level-job-application-form.svg',
24 ];
25 }
26
27 /**
28 * Get the full template including form data
29 *
30 * @return array<string, mixed>
31 */
32 public static function getTemplate(): array
33 {
34 return array_merge(
35 self::getTemplateMeta(),
36 [
37 'form_data' => [
38 'name' => BackendStrings::getTemplateStrings()['entry_level_job_application_form'],
39 'published' => 1,
40 'showTitle' => 1,
41 'storeEntries' => 1,
42 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(),
43 'fields' => array_merge(
44 self::getApplicantInformationFields(),
45 self::getEducationAndExperienceFields(),
46 self::getDocumentsAndAvailabilityFields()
47 ),
48 'settings' => [],
49 ],
50 ]
51 );
52 }
53
54 /**
55 * Get applicant information fields
56 *
57 * @return array<int, array<string, mixed>>
58 */
59 private static function getApplicantInformationFields(): array
60 {
61 return [
62 [
63 'id' => 1,
64 'fieldIndex' => 1,
65 'type' => 'name',
66 'label' => BackendStrings::getTemplateStrings()['name'],
67 'parentId' => null,
68 'defaultValue' => '',
69 'placeholder' => '',
70 'required' => true,
71 'readonly' => false,
72 'position' => 1,
73 ],
74 [
75 'id' => 2,
76 'type' => 'text',
77 'label' => BackendStrings::getNewFormStrings()['first_name'],
78 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
79 'required' => true,
80 'parentId' => 1,
81 'fieldIndex' => 1,
82 'defaultValue' => '',
83 'position' => 1,
84 'optionHide' => false,
85 'description' => '',
86 'settings' => json_encode(['nameFieldType' => 'nameField1']),
87 ],
88 [
89 'id' => 3,
90 'type' => 'text',
91 'label' => BackendStrings::getNewFormStrings()['last_name'],
92 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
93 'required' => true,
94 'parentId' => 1,
95 'fieldIndex' => 1,
96 'defaultValue' => '',
97 'position' => 2,
98 'optionHide' => false,
99 'description' => '',
100 'settings' => json_encode(['nameFieldType' => 'nameField2']),
101 ],
102 [
103 'id' => 4,
104 'fieldIndex' => 2,
105 'type' => 'email',
106 'label' => BackendStrings::getTemplateStrings()['email_address'],
107 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_email_address'],
108 'required' => true,
109 'parentId' => null,
110 'defaultValue' => '',
111 'position' => 2,
112 ],
113 ];
114 }
115
116 /**
117 * Get education and experience fields
118 *
119 * @return array<int, array<string, mixed>>
120 */
121 private static function getEducationAndExperienceFields(): array
122 {
123 return [
124 [
125 'id' => 5,
126 'fieldIndex' => 3,
127 'type' => 'select',
128 'label' => BackendStrings::getTemplateStrings()['education_level'],
129 'placeholder' => BackendStrings::getTemplateStrings()['select_education_level'],
130 'required' => true,
131 'parentId' => null,
132 'defaultValue' => '',
133 'position' => 3,
134 'fieldOptions' => [
135 [
136 'id' => 6,
137 'label' => BackendStrings::getTemplateStrings()['high_school'],
138 'value' => 'High School',
139 'isDefault' => false,
140 'position' => 1,
141 ], [
142 'id' => 7,
143 'label' => BackendStrings::getTemplateStrings()['associate_degree'],
144 'value' => 'Associate Degree',
145 'isDefault' => false,
146 'position' => 2,
147 ], [
148 'id' => 8,
149 'label' => BackendStrings::getTemplateStrings()['bachelor_degree'],
150 'value' => 'Bachelor\'s Degree',
151 'isDefault' => false,
152 'position' => 3,
153 ], [
154 'id' => 9,
155 'label' => BackendStrings::getTemplateStrings()['master_degree'],
156 'value' => 'Master\'s Degree',
157 'isDefault' => false,
158 'position' => 4,
159 ]
160 ],
161 ],
162 [
163 'id' => 10,
164 'fieldIndex' => 4,
165 'type' => 'text',
166 'label' => BackendStrings::getTemplateStrings()['school_university'],
167 'placeholder' => BackendStrings::getTemplateStrings()['enter_school_university'],
168 'required' => true,
169 'parentId' => null,
170 'defaultValue' => '',
171 'position' => 4,
172 ],
173 [
174 'id' => 11,
175 'fieldIndex' => 5,
176 'type' => 'textarea',
177 'label' => BackendStrings::getTemplateStrings()['internship_experience'],
178 'placeholder' => BackendStrings::getTemplateStrings()['enter_internship_experience'],
179 'required' => false,
180 'parentId' => null,
181 'defaultValue' => '',
182 'position' => 5,
183 'rows' => 3,
184 ],
185 ];
186 }
187
188 /**
189 * Get documents and availability fields
190 *
191 * @return array<int, array<string, mixed>>
192 */
193 private static function getDocumentsAndAvailabilityFields(): array
194 {
195 return [
196 [
197 'id' => 12,
198 'fieldIndex' => 6,
199 'type' => 'file-upload',
200 'label' => BackendStrings::getTemplateStrings()['cv_upload'],
201 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
202 'required' => true,
203 'parentId' => null,
204 'defaultValue' => '',
205 'position' => 6,
206 'maxFileSizeMb' => 999,
207 'saveUploadsTo' => 'ivyforms',
208 'allowedFileExtensions' => [],
209 'allowMultiple' => false,
210 'maxUploadCount' => 0,
211 ],
212 [
213 'id' => 13,
214 'fieldIndex' => 7,
215 'type' => 'file-upload',
216 'label' => BackendStrings::getTemplateStrings()['portfolio_work_samples'],
217 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
218 'required' => false,
219 'parentId' => null,
220 'defaultValue' => '',
221 'position' => 7,
222 'maxFileSizeMb' => 999,
223 'saveUploadsTo' => 'ivyforms',
224 'allowedFileExtensions' => [],
225 'allowMultiple' => false,
226 'maxUploadCount' => 0,
227 ],
228 [
229 'id' => 14,
230 'fieldIndex' => 8,
231 'type' => 'date',
232 'label' => BackendStrings::getTemplateStrings()['availability_date'],
233 'placeholder' => BackendStrings::getTemplateStrings()['select_availability_date'],
234 'required' => true,
235 'parentId' => null,
236 'defaultValue' => '',
237 'position' => 8,
238 'dateFieldType' => 'picker',
239 'dateFormat' => 'MM/DD/YYYY',
240 ],
241 ];
242 }
243 }
244