PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
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 / TechnicalInterviewFeedbackFormTemplate.php

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

384 lines 13.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 TechnicalInterviewFeedbackFormTemplate
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' => 'technical_interview_feedback_form',
18 'name' => BackendStrings::getTemplateStrings()['technical_interview_feedback_form'],
19 'description' => BackendStrings::getTemplateStrings()['technical_interview_feedback_form_desc'],
20 'category' => 'feedback-forms',
21 'subcategory' => 'interview-feedback-forms',
22 'is_pro' => false,
23 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'technical-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()['technical_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::getInterviewOutcomeFields(),
46 self::getRatingFields(),
47 self::getKeyAreasFields(),
48 self::getRecommendationFields(),
49 self::getInterviewerInformationFields()
50 ),
51 'settings' => []
52 ]
53 ]
54 );
55 }
56
57 /**
58 * Get candidate information fields
59 *
60 * @return array<int, array<string, mixed>>
61 */
62 private static function getCandidateInformationFields(): array
63 {
64 return [
65 // Candidate Name or Reference (Text Field)
66 [
67 'id' => 1,
68 'fieldIndex' => 1,
69 'type' => 'text',
70 'label' => BackendStrings::getTemplateStrings()['candidate_name_or_id'],
71 'placeholder' => BackendStrings::getTemplateStrings()['enter_candidate_name_or_id'],
72 'required' => false,
73 'parentId' => null,
74 'defaultValue' => '',
75 'position' => 1,
76 ],
77 ];
78 }
79
80 /**
81 * Get interview outcome fields
82 *
83 * @return array<int, array<string, mixed>>
84 */
85 private static function getInterviewOutcomeFields(): array
86 {
87 return [
88 // Overall Interview Outcome
89 [
90 'id' => 7,
91 'fieldIndex' => 2,
92 'type' => 'radio',
93 'label' => BackendStrings::getTemplateStrings()['overall_interview_outcome'],
94 'required' => true,
95 'parentId' => null,
96 'defaultValue' => '',
97 'placeholder' => '',
98 'position' => 2,
99 'fieldOptions' => [
100 [
101 'id' => 2,
102 'label' => BackendStrings::getTemplateStrings()['very_positive'],
103 'value' => 'very_positive',
104 'isDefault' => false,
105 'position' => 1
106 ],
107 [
108 'id' => 3,
109 'label' => BackendStrings::getTemplateStrings()['mostly_positive'],
110 'value' => 'mostly_positive',
111 'isDefault' => false,
112 'position' => 2
113 ],
114 [
115 'id' => 4,
116 'label' => BackendStrings::getTemplateStrings()['neutral'],
117 'value' => 'neutral',
118 'isDefault' => false,
119 'position' => 3
120 ],
121 [
122 'id' => 5,
123 'label' => BackendStrings::getTemplateStrings()['mostly_negative'],
124 'value' => 'mostly_negative',
125 'isDefault' => false,
126 'position' => 4
127 ],
128 [
129 'id' => 6,
130 'label' => BackendStrings::getTemplateStrings()['very_negative'],
131 'value' => 'very_negative',
132 'isDefault' => false,
133 'position' => 5
134 ],
135 ],
136 ],
137 ];
138 }
139
140 /**
141 * Get rating fields
142 *
143 * @return array<int, array<string, mixed>>
144 */
145 private static function getRatingFields(): array
146 {
147 return [
148 // Overall Candidate Fit Rating
149 [
150 'id' => 13,
151 'fieldIndex' => 3,
152 'type' => 'rating',
153 'label' => BackendStrings::getTemplateStrings()['overall_candidate_fit'],
154 'required' => true,
155 'defaultValue' => '',
156 'placeholder' => '',
157 'position' => 3,
158 'labelPosition' => 'default',
159 'ratingIcon' => 'star',
160 'description' => '',
161 'fieldOptions' => [
162 [
163 'id' => 8,
164 'label' => BackendStrings::getNewFormStrings()['good'],
165 'value' => '1',
166 'isDefault' => false,
167 'position' => 1
168 ],
169 [
170 'id' => 9,
171 'label' => BackendStrings::getNewFormStrings()['nice'],
172 'value' => '2',
173 'isDefault' => false,
174 'position' => 2
175 ],
176 [
177 'id' => 10,
178 'label' => BackendStrings::getNewFormStrings()['very_good'],
179 'value' => '3',
180 'isDefault' => false,
181 'position' => 3
182 ],
183 [
184 'id' => 11,
185 'label' => BackendStrings::getNewFormStrings()['awesome'],
186 'value' => '4',
187 'isDefault' => false,
188 'position' => 4
189 ],
190 [
191 'id' => 12,
192 'label' => BackendStrings::getNewFormStrings()['amazing'],
193 'value' => '5',
194 'isDefault' => false,
195 'position' => 5
196 ],
197 ],
198 'showValues' => false,
199 'showRatingText' => false,
200 ],
201 ];
202 }
203
204 /**
205 * Get key areas fields
206 *
207 * @return array<int, array<string, mixed>>
208 */
209 private static function getKeyAreasFields(): array
210 {
211 return [
212 // Key Areas Observed
213 [
214 'id' => 19,
215 'fieldIndex' => 4,
216 'type' => 'checkbox',
217 'label' => BackendStrings::getTemplateStrings()['key_areas_observed'],
218 'required' => false,
219 'parentId' => null,
220 'defaultValue' => '',
221 'placeholder' => '',
222 'position' => 4,
223 'fieldOptions' => [
224 [
225 'id' => 14,
226 'label' => BackendStrings::getTemplateStrings()['communication'],
227 'value' => 'Communication',
228 'isDefault' => false,
229 'position' => 1
230 ],
231 [
232 'id' => 15,
233 'label' => BackendStrings::getTemplateStrings()['problem_solving'],
234 'value' => 'Problem-solving',
235 'isDefault' => false,
236 'position' => 2
237 ],
238 [
239 'id' => 16,
240 'label' => BackendStrings::getTemplateStrings()['technical_or_role_specific_skills'],
241 'value' => 'Technical or role-specific skills',
242 'isDefault' => false,
243 'position' => 3
244 ],
245 [
246 'id' => 17,
247 'label' => BackendStrings::getTemplateStrings()['cultural_fit'],
248 'value' => 'Cultural fit',
249 'isDefault' => false,
250 'position' => 4
251 ],
252 [
253 'id' => 18,
254 'label' => BackendStrings::getTemplateStrings()['professionalism'],
255 'value' => 'Professionalism',
256 'isDefault' => false,
257 'position' => 5
258 ],
259 ]
260 ],
261 // Key Observations
262 [
263 'id' => 20,
264 'fieldIndex' => 5,
265 'type' => 'textarea',
266 'label' => BackendStrings::getTemplateStrings()['key_observations'],
267 'placeholder' => BackendStrings::getTemplateStrings()['key_observations_placeholder'],
268 'required' => false,
269 'parentId' => null,
270 'defaultValue' => '',
271 'position' => 5,
272 'rows' => 3,
273 ],
274 ];
275 }
276
277 /**
278 * Get recommendation fields
279 *
280 * @return array<int, array<string, mixed>>
281 */
282 private static function getRecommendationFields(): array
283 {
284 return [
285 // Recommendation
286 [
287 'id' => 25,
288 'fieldIndex' => 6,
289 'type' => 'radio',
290 'label' => BackendStrings::getTemplateStrings()['recommendation'],
291 'required' => true,
292 'parentId' => null,
293 'defaultValue' => '',
294 'placeholder' => '',
295 'position' => 6,
296 'fieldOptions' => [
297 [
298 'id' => 21,
299 'label' => BackendStrings::getTemplateStrings()['strong_hire'],
300 'value' => 'Strong hire',
301 'isDefault' => false,
302 'position' => 1
303 ],
304 [
305 'id' => 22,
306 'label' => BackendStrings::getTemplateStrings()['hire'],
307 'value' => 'Hire',
308 'isDefault' => false,
309 'position' => 2
310 ],
311 [
312 'id' => 23,
313 'label' => BackendStrings::getTemplateStrings()['consider'],
314 'value' => 'Consider',
315 'isDefault' => false,
316 'position' => 3
317 ],
318 [
319 'id' => 24,
320 'label' => BackendStrings::getTemplateStrings()['do_not_proceed'],
321 'value' => 'Do not proceed',
322 'isDefault' => false,
323 'position' => 4
324 ],
325 ]
326 ],
327 ];
328 }
329
330 /**
331 * Get interviewer information fields
332 *
333 * @return array<int, array<string, mixed>>
334 */
335 private static function getInterviewerInformationFields(): array
336 {
337 return [
338 // Interviewer Name
339 [
340 'id' => 26,
341 'fieldIndex' => 7,
342 'type' => 'name',
343 'label' => BackendStrings::getTemplateStrings()['interviewer_name'],
344 'parentId' => null,
345 'defaultValue' => '',
346 'placeholder' => '',
347 'required' => false,
348 'readonly' => false,
349 'position' => 7,
350 ],
351 // First Name - Child of Name Field
352 [
353 'id' => 27,
354 'type' => 'text',
355 'label' => BackendStrings::getNewFormStrings()['first_name'],
356 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
357 'required' => false,
358 'parentId' => 7,
359 'fieldIndex' => 7,
360 'defaultValue' => '',
361 'position' => 1,
362 'optionHide' => false,
363 'description' => '',
364 'settings' => json_encode(['nameFieldType' => 'nameField1']),
365 ],
366 // Last Name - Child of Name Field
367 [
368 'id' => 28,
369 'type' => 'text',
370 'label' => BackendStrings::getNewFormStrings()['last_name'],
371 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
372 'required' => false,
373 'parentId' => 7,
374 'fieldIndex' => 7,
375 'defaultValue' => '',
376 'position' => 2,
377 'optionHide' => false,
378 'description' => '',
379 'settings' => json_encode(['nameFieldType' => 'nameField2']),
380 ],
381 ];
382 }
383 }
384