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

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

201 lines 7.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 GeneralJobApplicationFormTemplate
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' => 'general_job_application_form',
18 'name' => BackendStrings::getTemplateStrings()['general_job_application_form'],
19 'description' => BackendStrings::getTemplateStrings()['general_job_application_form_desc'],
20 'category' => 'application-forms',
21 'subcategory' => 'job-application-forms',
22 'is_pro' => false,
23 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'general-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()['general_job_application_form'],
39 'published' => 1,
40 'showTitle' => 1,
41 'storeEntries' => 1,
42 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(),
43 'fields' => [
44 [
45 'id' => 1,
46 'fieldIndex' => 1,
47 'type' => 'name',
48 'label' => BackendStrings::getTemplateStrings()['name'],
49 'parentId' => null,
50 'defaultValue' => '',
51 'placeholder' => '',
52 'required' => true,
53 'readonly' => false,
54 'position' => 1,
55 ],
56 [
57 'id' => 2,
58 'type' => 'text',
59 'label' => BackendStrings::getNewFormStrings()['first_name'],
60 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
61 'required' => true,
62 'parentId' => 1,
63 'fieldIndex' => 1,
64 'defaultValue' => '',
65 'position' => 1,
66 'optionHide' => false,
67 'description' => '',
68 'settings' => json_encode(['nameFieldType' => 'nameField1']),
69 ],
70 [
71 'id' => 3,
72 'type' => 'text',
73 'label' => BackendStrings::getNewFormStrings()['last_name'],
74 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
75 'required' => true,
76 'parentId' => 1,
77 'fieldIndex' => 1,
78 'defaultValue' => '',
79 'position' => 2,
80 'optionHide' => false,
81 'description' => '',
82 'settings' => json_encode(['nameFieldType' => 'nameField2']),
83 ],
84 [
85 'id' => 4,
86 'fieldIndex' => 2,
87 'type' => 'email',
88 'label' => BackendStrings::getTemplateStrings()['email_address'],
89 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_email_address'],
90 'required' => true,
91 'parentId' => null,
92 'defaultValue' => '',
93 'position' => 2,
94 ],
95 [
96 'id' => 5,
97 'fieldIndex' => 3,
98 'type' => 'phone',
99 'label' => BackendStrings::getTemplateStrings()['phone_number'],
100 'placeholder' => '+1 (_) _-_',
101 'required' => true,
102 'parentId' => null,
103 'defaultValue' => '',
104 'position' => 3,
105 'phoneAutoDetect' => true,
106 ],
107 [
108 'id' => 6,
109 'fieldIndex' => 4,
110 'type' => 'text',
111 'label' => BackendStrings::getTemplateStrings()['position_applied_for'],
112 'placeholder' => BackendStrings::getTemplateStrings()['enter_position_applied_for'],
113 'required' => true,
114 'parentId' => null,
115 'defaultValue' => '',
116 'position' => 4,
117 ],
118 [
119 'id' => 7,
120 'fieldIndex' => 5,
121 'type' => 'select',
122 'label' => BackendStrings::getTemplateStrings()['experience_level'],
123 'placeholder' => BackendStrings::getTemplateStrings()['select_experience_level'],
124 'required' => true,
125 'parentId' => null,
126 'defaultValue' => '',
127 'position' => 5,
128 'fieldOptions' => [
129 [
130 'id' => 8,
131 'label' => BackendStrings::getTemplateStrings()['junior'],
132 'value' => 'Junior',
133 'isDefault' => false,
134 'position' => 1,
135 ], [
136 'id' => 9,
137 'label' => BackendStrings::getTemplateStrings()['mid'],
138 'value' => 'Mid',
139 'isDefault' => false,
140 'position' => 2,
141 ], [
142 'id' => 10,
143 'label' => BackendStrings::getTemplateStrings()['senior'],
144 'value' => 'Senior',
145 'isDefault' => false,
146 'position' => 3,
147 ]
148 ],
149 ],
150 [
151 'id' => 11,
152 'fieldIndex' => 6,
153 'type' => 'file-upload',
154 'label' => BackendStrings::getTemplateStrings()['cv_resume_upload'],
155 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
156 'required' => true,
157 'parentId' => null,
158 'defaultValue' => '',
159 'position' => 6,
160 'maxFileSizeMb' => 999,
161 'saveUploadsTo' => 'ivyforms',
162 'allowedFileExtensions' => [],
163 'allowMultiple' => false,
164 'maxUploadCount' => 0,
165 ],
166 [
167 'id' => 12,
168 'fieldIndex' => 7,
169 'type' => 'file-upload',
170 'label' => BackendStrings::getTemplateStrings()['cover_letter_upload'],
171 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'],
172 'required' => false,
173 'parentId' => null,
174 'defaultValue' => '',
175 'position' => 7,
176 'maxFileSizeMb' => 999,
177 'saveUploadsTo' => 'ivyforms',
178 'allowedFileExtensions' => [],
179 'allowMultiple' => false,
180 'maxUploadCount' => 0,
181 ],
182 [
183 'id' => 13,
184 'fieldIndex' => 8,
185 'type' => 'textarea',
186 'label' => BackendStrings::getTemplateStrings()['message_motivation'],
187 'placeholder' => BackendStrings::getTemplateStrings()['enter_message_motivation'],
188 'required' => false,
189 'parentId' => null,
190 'defaultValue' => '',
191 'position' => 8,
192 'rows' => 3,
193 ],
194 ],
195 'settings' => [],
196 ],
197 ]
198 );
199 }
200 }
201