ivyforms
/
backend
/
src
/
Services
/
Template
/
DigitalMarketingInternshipApplicationFormTemplate.php
DigitalMarketingInternshipApplicationFormTemplate.php in The Innovative Form Builder – IvyForms 1.5, at backend/src/Services/Template/DigitalMarketingInternshipApplicationFormTemplate.php
| 1 | <?php |
| 2 | |
| 3 | namespace IvyForms\Services\Template; |
| 4 | |
| 5 | use IvyForms\Services\Translations\BackendStrings; |
| 6 | |
| 7 | class DigitalMarketingInternshipApplicationFormTemplate |
| 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' => 'digital_marketing_internship_application_form', |
| 18 | 'name' => BackendStrings::getTemplateStrings()['digital_marketing_internship_application_form'], |
| 19 | 'description' => BackendStrings::getTemplateStrings()['digital_marketing_internship_application_form_desc'], |
| 20 | 'category' => 'application-forms', |
| 21 | 'subcategory' => 'internship-application-forms', |
| 22 | 'is_pro' => false, |
| 23 | 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'digital-marketing-internship-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()['digital_marketing_internship_application_form'], |
| 39 | 'published' => 1, |
| 40 | 'showTitle' => 1, |
| 41 | 'storeEntries' => 1, |
| 42 | 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(), |
| 43 | 'fields' => array_merge( |
| 44 | self::getApplicantInformationFields(), |
| 45 | self::getEducationAndExperienceFields(), |
| 46 | self::getDocumentsAndAvailabilityFields() |
| 47 | ), |
| 48 | 'settings' => [], |
| 49 | ], |
| 50 | ] |
| 51 | ); |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Get applicant information fields |
| 56 | * |
| 57 | * @return array<int, array<string, mixed>> |
| 58 | */ |
| 59 | private static function getApplicantInformationFields(): array |
| 60 | { |
| 61 | return [ |
| 62 | [ |
| 63 | 'id' => 1, |
| 64 | 'fieldIndex' => 1, |
| 65 | 'type' => 'name', |
| 66 | 'label' => BackendStrings::getTemplateStrings()['full_name'], |
| 67 | 'parentId' => null, |
| 68 | 'defaultValue' => '', |
| 69 | 'placeholder' => '', |
| 70 | 'required' => true, |
| 71 | 'readonly' => false, |
| 72 | 'position' => 1, |
| 73 | ], |
| 74 | [ |
| 75 | 'id' => 2, |
| 76 | 'type' => 'text', |
| 77 | 'label' => BackendStrings::getNewFormStrings()['first_name'], |
| 78 | 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'], |
| 79 | 'required' => true, |
| 80 | 'parentId' => 1, |
| 81 | 'fieldIndex' => 1, |
| 82 | 'defaultValue' => '', |
| 83 | 'position' => 1, |
| 84 | 'optionHide' => false, |
| 85 | 'description' => '', |
| 86 | 'settings' => json_encode(['nameFieldType' => 'nameField1']), |
| 87 | ], |
| 88 | [ |
| 89 | 'id' => 3, |
| 90 | 'type' => 'text', |
| 91 | 'label' => BackendStrings::getNewFormStrings()['last_name'], |
| 92 | 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'], |
| 93 | 'required' => true, |
| 94 | 'parentId' => 1, |
| 95 | 'fieldIndex' => 1, |
| 96 | 'defaultValue' => '', |
| 97 | 'position' => 2, |
| 98 | 'optionHide' => false, |
| 99 | 'description' => '', |
| 100 | 'settings' => json_encode(['nameFieldType' => 'nameField2']), |
| 101 | ], |
| 102 | [ |
| 103 | 'id' => 4, |
| 104 | 'fieldIndex' => 2, |
| 105 | 'type' => 'email', |
| 106 | 'label' => BackendStrings::getTemplateStrings()['email_address'], |
| 107 | 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_email_address'], |
| 108 | 'required' => true, |
| 109 | 'parentId' => null, |
| 110 | 'defaultValue' => '', |
| 111 | 'position' => 2, |
| 112 | ], |
| 113 | [ |
| 114 | 'id' => 5, |
| 115 | 'fieldIndex' => 3, |
| 116 | 'type' => 'phone', |
| 117 | 'label' => BackendStrings::getTemplateStrings()['phone_number'], |
| 118 | 'placeholder' => '+1 (_) _-_', |
| 119 | 'required' => true, |
| 120 | 'parentId' => null, |
| 121 | 'defaultValue' => '', |
| 122 | 'position' => 3, |
| 123 | 'phoneAutoDetect' => true, |
| 124 | ], |
| 125 | ]; |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * Get education and experience fields |
| 130 | * |
| 131 | * @return array<int, array<string, mixed>> |
| 132 | */ |
| 133 | private static function getEducationAndExperienceFields(): array |
| 134 | { |
| 135 | return [ |
| 136 | [ |
| 137 | 'id' => 6, |
| 138 | 'fieldIndex' => 4, |
| 139 | 'type' => 'text', |
| 140 | 'label' => BackendStrings::getTemplateStrings()['university_education'], |
| 141 | 'placeholder' => BackendStrings::getTemplateStrings()['enter_university_education'], |
| 142 | 'required' => true, |
| 143 | 'parentId' => null, |
| 144 | 'defaultValue' => '', |
| 145 | 'position' => 4, |
| 146 | ], |
| 147 | [ |
| 148 | 'id' => 7, |
| 149 | 'fieldIndex' => 5, |
| 150 | 'type' => 'select', |
| 151 | 'label' => BackendStrings::getTemplateStrings()['marketing_knowledge_level'], |
| 152 | 'placeholder' => BackendStrings::getTemplateStrings()['select_marketing_knowledge_level'], |
| 153 | 'required' => true, |
| 154 | 'parentId' => null, |
| 155 | 'defaultValue' => '', |
| 156 | 'position' => 5, |
| 157 | 'fieldOptions' => [ |
| 158 | [ |
| 159 | 'id' => 8, |
| 160 | 'label' => BackendStrings::getTemplateStrings()['marketing_knowledge_beginner'], |
| 161 | 'value' => 'Beginner', |
| 162 | 'isDefault' => false, |
| 163 | 'position' => 1, |
| 164 | ], [ |
| 165 | 'id' => 9, |
| 166 | 'label' => BackendStrings::getTemplateStrings()['marketing_knowledge_intermediate'], |
| 167 | 'value' => 'Intermediate', |
| 168 | 'isDefault' => false, |
| 169 | 'position' => 2, |
| 170 | ], [ |
| 171 | 'id' => 10, |
| 172 | 'label' => BackendStrings::getTemplateStrings()['marketing_knowledge_advanced'], |
| 173 | 'value' => 'Advanced', |
| 174 | 'isDefault' => false, |
| 175 | 'position' => 3, |
| 176 | ] |
| 177 | ], |
| 178 | ], |
| 179 | [ |
| 180 | 'id' => 11, |
| 181 | 'fieldIndex' => 6, |
| 182 | 'type' => 'textarea', |
| 183 | 'label' => BackendStrings::getTemplateStrings()['social_media_platforms_managed'], |
| 184 | 'placeholder' => BackendStrings::getTemplateStrings()['enter_social_media_platforms_managed'], |
| 185 | 'required' => true, |
| 186 | 'parentId' => null, |
| 187 | 'defaultValue' => '', |
| 188 | 'position' => 6, |
| 189 | 'rows' => 3, |
| 190 | ], |
| 191 | [ |
| 192 | 'id' => 12, |
| 193 | 'fieldIndex' => 7, |
| 194 | 'type' => 'textarea', |
| 195 | 'label' => BackendStrings::getTemplateStrings()['content_creation_experience'], |
| 196 | 'placeholder' => BackendStrings::getTemplateStrings()['enter_content_creation_experience'], |
| 197 | 'required' => true, |
| 198 | 'parentId' => null, |
| 199 | 'defaultValue' => '', |
| 200 | 'position' => 7, |
| 201 | 'rows' => 3, |
| 202 | ], |
| 203 | [ |
| 204 | 'id' => 13, |
| 205 | 'fieldIndex' => 8, |
| 206 | 'type' => 'textarea', |
| 207 | 'label' => BackendStrings::getTemplateStrings()['tools_knowledge_meta_ads_google_ads_canva_etc'], |
| 208 | 'placeholder' => BackendStrings::getTemplateStrings() |
| 209 | ['enter_tools_knowledge_meta_ads_google_ads_canva_etc'], |
| 210 | 'required' => true, |
| 211 | 'parentId' => null, |
| 212 | 'defaultValue' => '', |
| 213 | 'position' => 8, |
| 214 | 'rows' => 3, |
| 215 | ], |
| 216 | ]; |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Get documents and availability fields |
| 221 | * |
| 222 | * @return array<int, array<string, mixed>> |
| 223 | */ |
| 224 | private static function getDocumentsAndAvailabilityFields(): array |
| 225 | { |
| 226 | return [ |
| 227 | [ |
| 228 | 'id' => 14, |
| 229 | 'fieldIndex' => 9, |
| 230 | 'type' => 'file-upload', |
| 231 | 'label' => BackendStrings::getTemplateStrings()['portfolio_content_samples'], |
| 232 | 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'], |
| 233 | 'required' => false, |
| 234 | 'parentId' => null, |
| 235 | 'defaultValue' => '', |
| 236 | 'position' => 9, |
| 237 | 'maxFileSizeMb' => 999, |
| 238 | 'saveUploadsTo' => 'ivyforms', |
| 239 | 'allowedFileExtensions' => [], |
| 240 | 'allowMultiple' => false, |
| 241 | 'maxUploadCount' => 0, |
| 242 | ], |
| 243 | [ |
| 244 | 'id' => 15, |
| 245 | 'fieldIndex' => 10, |
| 246 | 'type' => 'file-upload', |
| 247 | 'label' => BackendStrings::getTemplateStrings()['cv_upload'], |
| 248 | 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'], |
| 249 | 'required' => true, |
| 250 | 'parentId' => null, |
| 251 | 'defaultValue' => '', |
| 252 | 'position' => 10, |
| 253 | 'maxFileSizeMb' => 999, |
| 254 | 'saveUploadsTo' => 'ivyforms', |
| 255 | 'allowedFileExtensions' => [], |
| 256 | 'allowMultiple' => false, |
| 257 | 'maxUploadCount' => 0, |
| 258 | ], |
| 259 | [ |
| 260 | 'id' => 16, |
| 261 | 'fieldIndex' => 11, |
| 262 | 'type' => 'file-upload', |
| 263 | 'label' => BackendStrings::getTemplateStrings()['motivation_letter'], |
| 264 | 'placeholder' => BackendStrings::getCommonStrings()['file_upload_placeholder_drag_here'], |
| 265 | 'required' => true, |
| 266 | 'parentId' => null, |
| 267 | 'defaultValue' => '', |
| 268 | 'position' => 11, |
| 269 | 'maxFileSizeMb' => 999, |
| 270 | 'saveUploadsTo' => 'ivyforms', |
| 271 | 'allowedFileExtensions' => [], |
| 272 | 'allowMultiple' => false, |
| 273 | 'maxUploadCount' => 0, |
| 274 | ], |
| 275 | [ |
| 276 | 'id' => 17, |
| 277 | 'fieldIndex' => 12, |
| 278 | 'type' => 'number', |
| 279 | 'label' => BackendStrings::getTemplateStrings()['availability'], |
| 280 | 'placeholder' => BackendStrings::getTemplateStrings()['enter_availability'], |
| 281 | 'required' => true, |
| 282 | 'parentId' => null, |
| 283 | 'defaultValue' => '', |
| 284 | 'position' => 12, |
| 285 | ], |
| 286 | ]; |
| 287 | } |
| 288 | } |
| 289 |