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 / SoftwareEngineeringInternshipApplicationFormTemplate.php

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

329 lines 12.5 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 SoftwareEngineeringInternshipApplicationFormTemplate
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_engineering_internship_application_form',
18 'name' => BackendStrings::getTemplateStrings()['software_engineering_internship_application_form'],
19 'description' => BackendStrings::getTemplateStrings()
20 ['software_engineering_internship_application_form_desc'],
21 'category' => 'application-forms',
22 'subcategory' => 'internship-application-forms',
23 'is_pro' => false,
24 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'software-engineering-internship-application-form.svg',
25 ];
26 }
27
28 /**
29 * Get the full template including form data
30 *
31 * @return array<string, mixed>
32 */
33 public static function getTemplate(): array
34 {
35 return array_merge(
36 self::getTemplateMeta(),
37 [
38 'form_data' => [
39 'name' => BackendStrings::getTemplateStrings()['software_engineering_internship_application_form'],
40 'published' => 1,
41 'showTitle' => 1,
42 'storeEntries' => 1,
43 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(),
44 'fields' => array_merge(
45 self::getApplicantInformationFields(),
46 self::getEducationAndTechnicalFields(),
47 self::getDocumentsAndAvailabilityFields()
48 ),
49 'settings' => [],
50 ],
51 ]
52 );
53 }
54
55 /**
56 * Get applicant information fields
57 *
58 * @return array<int, array<string, mixed>>
59 */
60 private static function getApplicantInformationFields(): array
61 {
62 return [
63 [
64 'id' => 1,
65 'fieldIndex' => 1,
66 'type' => 'name',
67 'label' => BackendStrings::getTemplateStrings()['full_name'],
68 'parentId' => null,
69 'defaultValue' => '',
70 'placeholder' => '',
71 'required' => true,
72 'readonly' => false,
73 'position' => 1,
74 ],
75 [
76 'id' => 2,
77 'type' => 'text',
78 'label' => BackendStrings::getNewFormStrings()['first_name'],
79 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
80 'required' => true,
81 'parentId' => 1,
82 'fieldIndex' => 1,
83 'defaultValue' => '',
84 'position' => 1,
85 'optionHide' => false,
86 'description' => '',
87 'settings' => json_encode(['nameFieldType' => 'nameField1']),
88 ],
89 [
90 'id' => 3,
91 'type' => 'text',
92 'label' => BackendStrings::getNewFormStrings()['last_name'],
93 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
94 'required' => true,
95 'parentId' => 1,
96 'fieldIndex' => 1,
97 'defaultValue' => '',
98 'position' => 2,
99 'optionHide' => false,
100 'description' => '',
101 'settings' => json_encode(['nameFieldType' => 'nameField2']),
102 ],
103 [
104 'id' => 4,
105 'fieldIndex' => 2,
106 'type' => 'email',
107 'label' => BackendStrings::getTemplateStrings()['email_address'],
108 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_email_address'],
109 'required' => true,
110 'parentId' => null,
111 'defaultValue' => '',
112 'position' => 2,
113 ],
114 [
115 'id' => 5,
116 'fieldIndex' => 3,
117 'type' => 'phone',
118 'label' => BackendStrings::getTemplateStrings()['phone_number'],
119 'placeholder' => '+1 (_) _-_',
120 'required' => true,
121 'parentId' => null,
122 'defaultValue' => '',
123 'position' => 3,
124 'phoneAutoDetect' => true,
125 ],
126 ];
127 }
128
129 /**
130 * Get education and technical fields
131 *
132 * @return array<int, array<string, mixed>>
133 */
134 private static function getEducationAndTechnicalFields(): array
135 {
136 return [
137 [
138 'id' => 6,
139 'fieldIndex' => 4,
140 'type' => 'text',
141 'label' => BackendStrings::getTemplateStrings()['university'],
142 'placeholder' => BackendStrings::getTemplateStrings()['enter_university'],
143 'required' => true,
144 'parentId' => null,
145 'defaultValue' => '',
146 'position' => 4,
147 ],
148 [
149 'id' => 7,
150 'fieldIndex' => 5,
151 'type' => 'select',
152 'label' => BackendStrings::getTemplateStrings()['field_of_study'],
153 'placeholder' => BackendStrings::getTemplateStrings()['select_field_of_study'],
154 'required' => true,
155 'parentId' => null,
156 'defaultValue' => '',
157 'position' => 5,
158 'fieldOptions' => [
159 [
160 'id' => 8,
161 'label' => BackendStrings::getTemplateStrings()['computer_science'],
162 'value' => 'Computer Science',
163 'isDefault' => false,
164 'position' => 1,
165 ], [
166 'id' => 9,
167 'label' => BackendStrings::getTemplateStrings()['software_engineering'],
168 'value' => 'Software Engineering',
169 'isDefault' => false,
170 'position' => 2,
171 ], [
172 'id' => 10,
173 'label' => BackendStrings::getTemplateStrings()['information_technology'],
174 'value' => 'Information Technology',
175 'isDefault' => false,
176 'position' => 3,
177 ], [
178 'id' => 11,
179 'label' => BackendStrings::getTemplateStrings()['business'],
180 'value' => 'Business',
181 'isDefault' => false,
182 'position' => 4,
183 ], [
184 'id' => 12,
185 'label' => BackendStrings::getTemplateStrings()['marketing'],
186 'value' => 'Marketing',
187 'isDefault' => false,
188 'position' => 5,
189 ], [
190 'id' => 13,
191 'label' => BackendStrings::getTemplateStrings()['other'],
192 'value' => 'Other',
193 'isDefault' => false,
194 'position' => 6,
195 ]
196 ],
197 ],
198 [
199 'id' => 14,
200 'fieldIndex' => 6,
201 'type' => 'number',
202 'label' => BackendStrings::getTemplateStrings()['current_year_of_study'],
203 'placeholder' => BackendStrings::getTemplateStrings()['enter_current_year_of_study'],
204 'required' => true,
205 'parentId' => null,
206 'defaultValue' => '',
207 'position' => 6,
208 ],
209 [
210 'id' => 15,
211 'fieldIndex' => 7,
212 'type' => 'textarea',
213 'label' => BackendStrings::getTemplateStrings()['programming_languages_known'],
214 'placeholder' => BackendStrings::getTemplateStrings()['enter_programming_languages_known'],
215 'required' => true,
216 'parentId' => null,
217 'defaultValue' => '',
218 'position' => 7,
219 'rows' => 3,
220 ],
221 [
222 'id' => 16,
223 'fieldIndex' => 8,
224 'type' => 'website',
225 'label' => BackendStrings::getTemplateStrings()['github_portfolio'],
226 'placeholder' => BackendStrings::getTemplateStrings()['enter_github_portfolio'],
227 'required' => true,
228 'parentId' => null,
229 'defaultValue' => '',
230 'position' => 8,
231 ],
232 [
233 'id' => 17,
234 'fieldIndex' => 9,
235 'type' => 'textarea',
236 'label' => BackendStrings::getTemplateStrings()['coding_projects_description'],
237 'placeholder' => BackendStrings::getTemplateStrings()['enter_coding_projects_description'],
238 'required' => true,
239 'parentId' => null,
240 'defaultValue' => '',
241 'position' => 9,
242 'rows' => 3,
243 ],
244 [
245 'id' => 18,
246 'fieldIndex' => 10,
247 'type' => 'textarea',
248 'label' => BackendStrings::getTemplateStrings()['internship_goals'],
249 'placeholder' => BackendStrings::getTemplateStrings()['enter_internship_goals'],
250 'required' => true,
251 'parentId' => null,
252 'defaultValue' => '',
253 'position' => 10,
254 'rows' => 3,
255 ],
256 ];
257 }
258
259 /**
260 * Get documents and availability fields
261 *
262 * @return array<int, array<string, mixed>>
263 */
264 private static function getDocumentsAndAvailabilityFields(): array
265 {
266 return [
267 [
268 'id' => 19,
269 'fieldIndex' => 11,
270 'type' => 'file-upload',
271 'label' => BackendStrings::getTemplateStrings()['cv_upload'],
272 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
273 'required' => true,
274 'parentId' => null,
275 'defaultValue' => '',
276 'position' => 11,
277 'maxFileSizeMb' => 999,
278 'saveUploadsTo' => 'ivyforms',
279 'allowedFileExtensions' => [],
280 'allowMultiple' => false,
281 'maxUploadCount' => 0,
282 ],
283 [
284 'id' => 20,
285 'fieldIndex' => 12,
286 'type' => 'file-upload',
287 'label' => BackendStrings::getTemplateStrings()['transcript_upload'],
288 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
289 'required' => false,
290 'parentId' => null,
291 'defaultValue' => '',
292 'position' => 12,
293 'maxFileSizeMb' => 999,
294 'saveUploadsTo' => 'ivyforms',
295 'allowedFileExtensions' => [],
296 'allowMultiple' => false,
297 'maxUploadCount' => 0,
298 ],
299 [
300 'id' => 21,
301 'fieldIndex' => 13,
302 'type' => 'file-upload',
303 'label' => BackendStrings::getTemplateStrings()['motivation_letter'],
304 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
305 'required' => true,
306 'parentId' => null,
307 'defaultValue' => '',
308 'position' => 13,
309 'maxFileSizeMb' => 999,
310 'saveUploadsTo' => 'ivyforms',
311 'allowedFileExtensions' => [],
312 'allowMultiple' => false,
313 'maxUploadCount' => 0,
314 ],
315 [
316 'id' => 22,
317 'fieldIndex' => 14,
318 'type' => 'number',
319 'label' => BackendStrings::getTemplateStrings()['availability_hours_per_week'],
320 'placeholder' => BackendStrings::getTemplateStrings()['enter_availability_hours_per_week'],
321 'required' => true,
322 'parentId' => null,
323 'defaultValue' => '',
324 'position' => 14,
325 ],
326 ];
327 }
328 }
329