PluginProbe
The Innovative Form Builder – IvyForms / 1.0
The Innovative Form Builder – IvyForms v1.0
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 / HRInterviewFeedbackFormTemplate.php

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

673 lines 23.6 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 HRInterviewFeedbackFormTemplate
8 {
9 /**
10 * Get the HR interview feedback form template
11 *
12 * @return array<string, mixed>
13 */
14 public static function getTemplate(): array
15 {
16 return [
17 'id' => 'hr_interview_feedback_form',
18 'name' => BackendStrings::getTemplateStrings()['hr_interview_feedback_form'],
19 'description' => BackendStrings::getTemplateStrings()['hr_interview_feedback_form_desc'],
20 'category' => 'feedback-forms',
21 'subcategory' => 'interview-feedback-forms',
22 'is_pro' => false,
23 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'hr-interview-feedback-form.svg',
24 'form_data' => [
25 'name' => BackendStrings::getTemplateStrings()['hr_interview_feedback_form'],
26 'published' => 1,
27 'showTitle' => 1,
28 'storeEntries' => 1,
29 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(),
30 'fields' => array_merge(
31 self::getCandidateInformationFields(),
32 self::getRatingFields(),
33 self::getBehavioralAssessmentFields(),
34 self::getInterviewerInformationFields()
35 ),
36 'settings' => []
37 ]
38 ];
39 }
40
41 /**
42 * Get candidate information fields
43 *
44 * @return array<int, array<string, mixed>>
45 */
46 private static function getCandidateInformationFields(): array
47 {
48 return [
49 // Candidate Full Name
50 [
51 'id' => 1,
52 'fieldIndex' => 1,
53 'type' => 'name',
54 'label' => BackendStrings::getTemplateStrings()['candidate_full_name'],
55 'parentId' => null,
56 'defaultValue' => '',
57 'placeholder' => '',
58 'required' => true,
59 'readonly' => false,
60 'position' => 1,
61 ],
62 // First Name - Child of Name Field
63 [
64 'id' => 2,
65 'type' => 'text',
66 'label' => BackendStrings::getNewFormStrings()['first_name'],
67 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
68 'required' => true,
69 'parentId' => 1,
70 'fieldIndex' => 1,
71 'defaultValue' => '',
72 'position' => 1,
73 'optionHide' => false,
74 'description' => '',
75 'settings' => json_encode(['nameFieldType' => 'nameField1']),
76 ],
77 // Last Name - Child of Name Field
78 [
79 'id' => 3,
80 'type' => 'text',
81 'label' => BackendStrings::getNewFormStrings()['last_name'],
82 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
83 'required' => true,
84 'parentId' => 1,
85 'fieldIndex' => 1,
86 'defaultValue' => '',
87 'position' => 2,
88 'optionHide' => false,
89 'description' => '',
90 'settings' => json_encode(['nameFieldType' => 'nameField2']),
91 ],
92 // Role Applied For
93 [
94 'id' => 10,
95 'fieldIndex' => 2,
96 'type' => 'select',
97 'label' => BackendStrings::getTemplateStrings()['role_applied_for'],
98 'placeholder' => BackendStrings::getTemplateStrings()['select_role_applied_for'],
99 'required' => true,
100 'parentId' => null,
101 'defaultValue' => '',
102 'position' => 2,
103 'fieldOptions' => [
104 [
105 'id' => 4,
106 'label' => BackendStrings::getTemplateStrings()['software_engineer'],
107 'value' => 'Software Engineer',
108 'isDefault' => false,
109 'position' => 1
110 ],
111 [
112 'id' => 5,
113 'label' => BackendStrings::getTemplateStrings()['product_manager'],
114 'value' => 'Product Manager',
115 'isDefault' => false,
116 'position' => 2
117 ],
118 [
119 'id' => 6,
120 'label' => BackendStrings::getTemplateStrings()['designer'],
121 'value' => 'Designer',
122 'isDefault' => false,
123 'position' => 3
124 ],
125 [
126 'id' => 7,
127 'label' => BackendStrings::getTemplateStrings()['marketing_specialist'],
128 'value' => 'Marketing Specialist',
129 'isDefault' => false,
130 'position' => 4
131 ],
132 [
133 'id' => 8,
134 'label' => BackendStrings::getTemplateStrings()['sales_representative'],
135 'value' => 'Sales Representative',
136 'isDefault' => false,
137 'position' => 5
138 ],
139 [
140 'id' => 9,
141 'label' => BackendStrings::getTemplateStrings()['other'],
142 'value' => 'Other',
143 'isDefault' => false,
144 'position' => 6
145 ],
146 ]
147 ],
148 // Interview Stage(s)
149 [
150 'id' => 16,
151 'fieldIndex' => 3,
152 'type' => 'checkbox',
153 'label' => BackendStrings::getTemplateStrings()['interview_stages'],
154 'required' => true,
155 'parentId' => null,
156 'defaultValue' => '',
157 'placeholder' => '',
158 'position' => 3,
159 'fieldOptions' => [
160 [
161 'id' => 11,
162 'label' => BackendStrings::getTemplateStrings()['initial_hr_screening'],
163 'value' => 'Initial HR screening',
164 'isDefault' => false,
165 'position' => 1
166 ],
167 [
168 'id' => 12,
169 'label' => BackendStrings::getTemplateStrings()['behavioral_interview'],
170 'value' => 'Behavioral interview',
171 'isDefault' => false,
172 'position' => 2
173 ],
174 [
175 'id' => 13,
176 'label' => BackendStrings::getTemplateStrings()['culture_fit_interview'],
177 'value' => 'Culture fit interview',
178 'isDefault' => false,
179 'position' => 3
180 ],
181 [
182 'id' => 14,
183 'label' => BackendStrings::getTemplateStrings()['final_interview'],
184 'value' => 'Final interview',
185 'isDefault' => false,
186 'position' => 4
187 ],
188 [
189 'id' => 15,
190 'label' => BackendStrings::getTemplateStrings()['panel_interview'],
191 'value' => 'Panel interview',
192 'isDefault' => false,
193 'position' => 5
194 ],
195 ]
196 ],
197 ];
198 }
199
200 /**
201 * Get rating fields
202 *
203 * @return array<int, array<string, mixed>>
204 */
205 private static function getRatingFields(): array
206 {
207 return array_merge(
208 self::getCommunicationSkillsRating(),
209 self::getCulturalFitValuesAlignmentRating(),
210 self::getMotivationEngagementRating(),
211 self::getProfessionalismAttitudeRating()
212 );
213 }
214
215 /**
216 * Get communication skills rating
217 *
218 * @return array<int, array<string, mixed>>
219 */
220 private static function getCommunicationSkillsRating(): array
221 {
222 return [[
223 'id' => 17,
224 'fieldIndex' => 4,
225 'type' => 'rating',
226 'label' => BackendStrings::getTemplateStrings()['communication_skills'],
227 'required' => true,
228 'defaultValue' => '',
229 'placeholder' => '',
230 'position' => 4,
231 'labelPosition' => 'default',
232 'ratingIcon' => 'star',
233 'description' => BackendStrings::getTemplateStrings()['communication_skills_desc'],
234 'fieldOptions' => self::getStandardRatingOptions(7),
235 'showValues' => false,
236 'showRatingText' => false,
237 ]];
238 }
239
240 /**
241 * Get cultural fit and values alignment rating
242 *
243 * @return array<int, array<string, mixed>>
244 */
245 private static function getCulturalFitValuesAlignmentRating(): array
246 {
247 return [[
248 'id' => 18,
249 'fieldIndex' => 5,
250 'type' => 'rating',
251 'label' => BackendStrings::getTemplateStrings()['cultural_fit_values_alignment'],
252 'required' => true,
253 'defaultValue' => '',
254 'placeholder' => '',
255 'position' => 5,
256 'labelPosition' => 'default',
257 'ratingIcon' => 'star',
258 'description' => BackendStrings::getTemplateStrings()['cultural_fit_values_alignment_desc'],
259 'fieldOptions' => self::getStandardRatingOptions(12),
260 'showValues' => false,
261 'showRatingText' => false,
262 ]];
263 }
264
265 /**
266 * Get motivation and engagement rating
267 *
268 * @return array<int, array<string, mixed>>
269 */
270 private static function getMotivationEngagementRating(): array
271 {
272 return [[
273 'id' => 19,
274 'fieldIndex' => 6,
275 'type' => 'rating',
276 'label' => BackendStrings::getTemplateStrings()['motivation_engagement'],
277 'required' => true,
278 'defaultValue' => '',
279 'placeholder' => '',
280 'position' => 6,
281 'labelPosition' => 'default',
282 'ratingIcon' => 'star',
283 'description' => BackendStrings::getTemplateStrings()['motivation_engagement_desc'],
284 'fieldOptions' => self::getStandardRatingOptions(17),
285 'showValues' => false,
286 'showRatingText' => false,
287 ]];
288 }
289
290 /**
291 * Get professionalism and attitude rating
292 *
293 * @return array<int, array<string, mixed>>
294 */
295 private static function getProfessionalismAttitudeRating(): array
296 {
297 return [[
298 'id' => 20,
299 'fieldIndex' => 7,
300 'type' => 'rating',
301 'label' => BackendStrings::getTemplateStrings()['professionalism_attitude'],
302 'required' => true,
303 'defaultValue' => '',
304 'placeholder' => '',
305 'position' => 7,
306 'labelPosition' => 'default',
307 'ratingIcon' => 'star',
308 'description' => BackendStrings::getTemplateStrings()['professionalism_attitude_desc'],
309 'fieldOptions' => self::getStandardRatingOptions(22),
310 'showValues' => false,
311 'showRatingText' => false,
312 ]];
313 }
314
315 /**
316 * Get standard rating options
317 *
318 * @return array<int, array<string, mixed>>
319 */
320 private static function getStandardRatingOptions(int $startId): array
321 {
322 return [
323 [
324 'id' => $startId,
325 'label' => BackendStrings::getNewFormStrings()['good'],
326 'value' => '1',
327 'isDefault' => false,
328 'position' => 1
329 ],
330 [
331 'id' => $startId + 1,
332 'label' => BackendStrings::getNewFormStrings()['nice'],
333 'value' => '2',
334 'isDefault' => false,
335 'position' => 2
336 ],
337 [
338 'id' => $startId + 2,
339 'label' => BackendStrings::getNewFormStrings()['very_good'],
340 'value' => '3',
341 'isDefault' => false,
342 'position' => 3
343 ],
344 [
345 'id' => $startId + 3,
346 'label' => BackendStrings::getNewFormStrings()['awesome'],
347 'value' => '4',
348 'isDefault' => false,
349 'position' => 4
350 ],
351 [
352 'id' => $startId + 4,
353 'label' => BackendStrings::getNewFormStrings()['amazing'],
354 'value' => '5',
355 'isDefault' => false,
356 'position' => 5
357 ],
358 ];
359 }
360
361 /**
362 * Get behavioral assessment fields
363 *
364 * @return array<int, array<string, mixed>>
365 */
366 private static function getBehavioralAssessmentFields(): array
367 {
368 return array_merge(
369 self::getStrengthsDemonstratedField(),
370 self::getBehavioralConcernsField(),
371 self::getBehavioralExamplesNotesField(),
372 self::getOverallBehavioralAssessmentField(),
373 self::getHRRecommendationField()
374 );
375 }
376
377 /**
378 * Get strengths demonstrated field
379 *
380 * @return array<int, array<string, mixed>>
381 */
382 private static function getStrengthsDemonstratedField(): array
383 {
384 return [[
385 'id' => 32,
386 'fieldIndex' => 8,
387 'type' => 'checkbox',
388 'label' => BackendStrings::getTemplateStrings()['strengths_demonstrated'],
389 'required' => false,
390 'parentId' => null,
391 'defaultValue' => '',
392 'placeholder' => '',
393 'position' => 8,
394 'fieldOptions' => [
395 [
396 'id' => 26,
397 'label' => BackendStrings::getTemplateStrings()['clear_confident_communication'],
398 'value' => 'Clear and confident communication',
399 'isDefault' => false,
400 'position' => 1
401 ],
402 [
403 'id' => 27,
404 'label' => BackendStrings::getTemplateStrings()['team_oriented_mindset'],
405 'value' => 'Team-oriented mindset',
406 'isDefault' => false,
407 'position' => 2
408 ],
409 [
410 'id' => 28,
411 'label' => BackendStrings::getTemplateStrings()['adaptability_flexibility'],
412 'value' => 'Adaptability and flexibility',
413 'isDefault' => false,
414 'position' => 3
415 ],
416 [
417 'id' => 29,
418 'label' => BackendStrings::getTemplateStrings()['ownership_accountability'],
419 'value' => 'Ownership and accountability',
420 'isDefault' => false,
421 'position' => 4
422 ],
423 [
424 'id' => 30,
425 'label' => BackendStrings::getTemplateStrings()['leadership_potential'],
426 'value' => 'Leadership potential',
427 'isDefault' => false,
428 'position' => 5
429 ],
430 [
431 'id' => 31,
432 'label' => BackendStrings::getTemplateStrings()['positive_attitude'],
433 'value' => 'Positive attitude',
434 'isDefault' => false,
435 'position' => 6
436 ],
437 ]
438 ]];
439 }
440
441 /**
442 * Get behavioral concerns field
443 *
444 * @return array<int, array<string, mixed>>
445 */
446 private static function getBehavioralConcernsField(): array
447 {
448 return [[
449 'id' => 38,
450 'fieldIndex' => 9,
451 'type' => 'checkbox',
452 'label' => BackendStrings::getTemplateStrings()['behavioral_concerns'],
453 'required' => false,
454 'parentId' => null,
455 'defaultValue' => '',
456 'placeholder' => '',
457 'position' => 9,
458 'fieldOptions' => [
459 [
460 'id' => 33,
461 'label' => BackendStrings::getTemplateStrings()['poor_communication'],
462 'value' => 'Poor communication',
463 'isDefault' => false,
464 'position' => 1
465 ],
466 [
467 'id' => 34,
468 'label' => BackendStrings::getTemplateStrings()['lack_of_motivation'],
469 'value' => 'Lack of motivation',
470 'isDefault' => false,
471 'position' => 2
472 ],
473 [
474 'id' => 35,
475 'label' => BackendStrings::getTemplateStrings()['resistance_to_feedback'],
476 'value' => 'Resistance to feedback',
477 'isDefault' => false,
478 'position' => 3
479 ],
480 [
481 'id' => 36,
482 'label' => BackendStrings::getTemplateStrings()['misalignment_with_values'],
483 'value' => 'Misalignment with values',
484 'isDefault' => false,
485 'position' => 4
486 ],
487 [
488 'id' => 37,
489 'label' => BackendStrings::getTemplateStrings()['unrealistic_expectations'],
490 'value' => 'Unrealistic expectations',
491 'isDefault' => false,
492 'position' => 5
493 ],
494 ]
495 ]];
496 }
497
498 /**
499 * Get behavioral examples and notes field
500 *
501 * @return array<int, array<string, mixed>>
502 */
503 private static function getBehavioralExamplesNotesField(): array
504 {
505 return [[
506 'id' => 39,
507 'fieldIndex' => 10,
508 'type' => 'textarea',
509 'label' => BackendStrings::getTemplateStrings()['behavioral_examples_notes'],
510 'placeholder' => BackendStrings::getTemplateStrings()['behavioral_examples_notes_placeholder'],
511 'required' => false,
512 'parentId' => null,
513 'defaultValue' => '',
514 'position' => 10,
515 'rows' => 3,
516 ]];
517 }
518
519 /**
520 * Get overall behavioral assessment field
521 *
522 * @return array<int, array<string, mixed>>
523 */
524 private static function getOverallBehavioralAssessmentField(): array
525 {
526 return [[
527 'id' => 44,
528 'fieldIndex' => 11,
529 'type' => 'radio',
530 'label' => BackendStrings::getTemplateStrings()['overall_behavioral_assessment'],
531 'required' => true,
532 'parentId' => null,
533 'defaultValue' => '',
534 'placeholder' => '',
535 'position' => 11,
536 'fieldOptions' => [
537 [
538 'id' => 40,
539 'label' => BackendStrings::getTemplateStrings()['excellent_fit'],
540 'value' => 'Excellent fit',
541 'isDefault' => false,
542 'position' => 1
543 ],
544 [
545 'id' => 41,
546 'label' => BackendStrings::getTemplateStrings()['good_fit'],
547 'value' => 'Good fit',
548 'isDefault' => false,
549 'position' => 2
550 ],
551 [
552 'id' => 42,
553 'label' => BackendStrings::getTemplateStrings()['partial_fit'],
554 'value' => 'Partial fit',
555 'isDefault' => false,
556 'position' => 3
557 ],
558 [
559 'id' => 43,
560 'label' => BackendStrings::getTemplateStrings()['poor_fit'],
561 'value' => 'Poor fit',
562 'isDefault' => false,
563 'position' => 4
564 ],
565 ]
566 ]];
567 }
568
569 /**
570 * Get HR recommendation field
571 *
572 * @return array<int, array<string, mixed>>
573 */
574 private static function getHRRecommendationField(): array
575 {
576 return [[
577 'id' => 49,
578 'fieldIndex' => 12,
579 'type' => 'radio',
580 'label' => BackendStrings::getTemplateStrings()['hr_recommendation'],
581 'required' => true,
582 'parentId' => null,
583 'defaultValue' => '',
584 'placeholder' => '',
585 'position' => 12,
586 'fieldOptions' => [
587 [
588 'id' => 45,
589 'label' => BackendStrings::getTemplateStrings()['strong_hire'],
590 'value' => 'Strong hire',
591 'isDefault' => false,
592 'position' => 1
593 ],
594 [
595 'id' => 46,
596 'label' => BackendStrings::getTemplateStrings()['hire'],
597 'value' => 'Hire',
598 'isDefault' => false,
599 'position' => 2
600 ],
601 [
602 'id' => 47,
603 'label' => BackendStrings::getTemplateStrings()['proceed_with_caution'],
604 'value' => 'Proceed with caution',
605 'isDefault' => false,
606 'position' => 3
607 ],
608 [
609 'id' => 48,
610 'label' => BackendStrings::getTemplateStrings()['do_not_proceed'],
611 'value' => 'Do not proceed',
612 'isDefault' => false,
613 'position' => 4
614 ],
615 ]
616 ]];
617 }
618
619 /**
620 * Get interviewer information fields
621 *
622 * @return array<int, array<string, mixed>>
623 */
624 private static function getInterviewerInformationFields(): array
625 {
626 return [
627 // HR Interviewer Name
628 [
629 'id' => 50,
630 'fieldIndex' => 13,
631 'type' => 'name',
632 'label' => BackendStrings::getTemplateStrings()['hr_interviewer_name'],
633 'parentId' => null,
634 'defaultValue' => '',
635 'placeholder' => '',
636 'required' => false,
637 'readonly' => false,
638 'position' => 13,
639 ],
640 // First Name - Child of Name Field
641 [
642 'id' => 51,
643 'type' => 'text',
644 'label' => BackendStrings::getNewFormStrings()['first_name'],
645 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
646 'required' => false,
647 'parentId' => 13,
648 'fieldIndex' => 13,
649 'defaultValue' => '',
650 'position' => 1,
651 'optionHide' => false,
652 'description' => '',
653 'settings' => json_encode(['nameFieldType' => 'nameField1']),
654 ],
655 // Last Name - Child of Name Field
656 [
657 'id' => 52,
658 'type' => 'text',
659 'label' => BackendStrings::getNewFormStrings()['last_name'],
660 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
661 'required' => false,
662 'parentId' => 13,
663 'fieldIndex' => 13,
664 'defaultValue' => '',
665 'position' => 2,
666 'optionHide' => false,
667 'description' => '',
668 'settings' => json_encode(['nameFieldType' => 'nameField2']),
669 ],
670 ];
671 }
672 }
673