PluginProbe
The Innovative Form Builder – IvyForms / 1.4
The Innovative Form Builder – IvyForms v1.4
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 / SoftwareDeveloperJobApplicationFormTemplate.php

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

302 lines 11.2 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 SoftwareDeveloperJobApplicationFormTemplate
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' => 'software_developer_job_application_form',
18 'name' => BackendStrings::getTemplateStrings()['software_developer_job_application_form'],
19 'description' => BackendStrings::getTemplateStrings()['software_developer_job_application_form_desc'],
20 'category' => 'application-forms',
21 'subcategory' => 'job-application-forms',
22 'is_pro' => false,
23 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'software-developer-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()['software_developer_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::getTechnicalExperienceFields(),
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()['full_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 'id' => 5,
115 'fieldIndex' => 3,
116 'type' => 'phone',
117 'label' => BackendStrings::getTemplateStrings()['phone_number'],
118 'placeholder' => '+1 (_) _-_',
119 'required' => true,
120 'parentId' => null,
121 'defaultValue' => '',
122 'position' => 3,
123 'phoneAutoDetect' => true,
124 ],
125 ];
126 }
127
128 /**
129 * Get technical experience fields
130 *
131 * @return array<int, array<string, mixed>>
132 */
133 private static function getTechnicalExperienceFields(): array
134 {
135 return [
136 [
137 'id' => 6,
138 'fieldIndex' => 4,
139 'type' => 'number',
140 'label' => BackendStrings::getTemplateStrings()['years_of_experience'],
141 'placeholder' => BackendStrings::getTemplateStrings()['enter_years_of_experience'],
142 'required' => true,
143 'parentId' => null,
144 'defaultValue' => '',
145 'position' => 4,
146 ],
147 [
148 'id' => 7,
149 'fieldIndex' => 5,
150 'type' => 'select',
151 'label' => BackendStrings::getTemplateStrings()['preferred_role'],
152 'placeholder' => BackendStrings::getTemplateStrings()['select_preferred_role'],
153 'required' => true,
154 'parentId' => null,
155 'defaultValue' => '',
156 'position' => 5,
157 'fieldOptions' => [
158 [
159 'id' => 8,
160 'label' => BackendStrings::getTemplateStrings()['frontend'],
161 'value' => 'Frontend',
162 'isDefault' => false,
163 'position' => 1,
164 ], [
165 'id' => 9,
166 'label' => BackendStrings::getTemplateStrings()['backend'],
167 'value' => 'Backend',
168 'isDefault' => false,
169 'position' => 2,
170 ], [
171 'id' => 10,
172 'label' => BackendStrings::getTemplateStrings()['full_stack'],
173 'value' => 'Full-stack',
174 'isDefault' => false,
175 'position' => 3,
176 ], [
177 'id' => 11,
178 'label' => BackendStrings::getTemplateStrings()['mobile'],
179 'value' => 'Mobile',
180 'isDefault' => false,
181 'position' => 4,
182 ]
183 ],
184 ],
185 [
186 'id' => 12,
187 'fieldIndex' => 6,
188 'type' => 'textarea',
189 'label' => BackendStrings::getTemplateStrings()['primary_tech_stack'],
190 'placeholder' => BackendStrings::getTemplateStrings()['enter_primary_tech_stack'],
191 'required' => true,
192 'parentId' => null,
193 'defaultValue' => '',
194 'position' => 6,
195 'rows' => 3,
196 ],
197 [
198 'id' => 13,
199 'fieldIndex' => 7,
200 'type' => 'website',
201 'label' => BackendStrings::getTemplateStrings()['github_profile'],
202 'placeholder' => BackendStrings::getTemplateStrings()['enter_github_profile'],
203 'required' => true,
204 'parentId' => null,
205 'defaultValue' => '',
206 'position' => 7,
207 ],
208 [
209 'id' => 14,
210 'fieldIndex' => 8,
211 'type' => 'website',
212 'label' => BackendStrings::getTemplateStrings()['portfolio_project_links'],
213 'placeholder' => BackendStrings::getTemplateStrings()['enter_portfolio_project_links'],
214 'required' => true,
215 'parentId' => null,
216 'defaultValue' => '',
217 'position' => 8,
218 ],
219 [
220 'id' => 15,
221 'fieldIndex' => 9,
222 'type' => 'textarea',
223 'label' => BackendStrings::getTemplateStrings()['biggest_project_description'],
224 'placeholder' => BackendStrings::getTemplateStrings()['enter_biggest_project_description'],
225 'required' => true,
226 'parentId' => null,
227 'defaultValue' => '',
228 'position' => 9,
229 'rows' => 3,
230 ],
231 [
232 'id' => 16,
233 'fieldIndex' => 10,
234 'type' => 'textarea',
235 'label' => BackendStrings::getTemplateStrings()['problem_solving_experience'],
236 'placeholder' => BackendStrings::getTemplateStrings()['enter_problem_solving_experience'],
237 'required' => false,
238 'parentId' => null,
239 'defaultValue' => '',
240 'position' => 10,
241 'rows' => 3,
242 ],
243 ];
244 }
245
246 /**
247 * Get documents and availability fields
248 *
249 * @return array<int, array<string, mixed>>
250 */
251 private static function getDocumentsAndAvailabilityFields(): array
252 {
253 return [
254 [
255 'id' => 17,
256 'fieldIndex' => 11,
257 'type' => 'file-upload',
258 'label' => BackendStrings::getTemplateStrings()['cv_upload'],
259 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
260 'required' => true,
261 'parentId' => null,
262 'defaultValue' => '',
263 'position' => 11,
264 'maxFileSizeMb' => 999,
265 'saveUploadsTo' => 'ivyforms',
266 'allowedFileExtensions' => [],
267 'allowMultiple' => false,
268 'maxUploadCount' => 0,
269 ],
270 [
271 'id' => 18,
272 'fieldIndex' => 12,
273 'type' => 'file-upload',
274 'label' => BackendStrings::getTemplateStrings()['code_samples_upload'],
275 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
276 'required' => false,
277 'parentId' => null,
278 'defaultValue' => '',
279 'position' => 12,
280 'maxFileSizeMb' => 999,
281 'saveUploadsTo' => 'ivyforms',
282 'allowedFileExtensions' => [],
283 'allowMultiple' => false,
284 'maxUploadCount' => 0,
285 ],
286 [
287 'id' => 19,
288 'fieldIndex' => 13,
289 'type' => 'date',
290 'label' => BackendStrings::getTemplateStrings()['availability_start_date'],
291 'placeholder' => BackendStrings::getTemplateStrings()['select_availability_start_date'],
292 'required' => true,
293 'parentId' => null,
294 'defaultValue' => '',
295 'position' => 13,
296 'dateFieldType' => 'picker',
297 'dateFormat' => 'MM/DD/YYYY',
298 ]
299 ];
300 }
301 }
302