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

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

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