1. Home
  2. Developer
  3. Code Snippets
  4. Add cover letter/additional files

Add cover letter/additional files

All-access subscribers can add these fields via the Advanced Applications add-on.

Or you can use this code snippet to add an additional file upload to your application form and adjust the labels/description for more advanced control.

function mdocs_example_matador_application_default_fields( $fields ) {
    $field_to_add = [ 'letter', ];
    return array_merge( $fields, $field_to_add );
}
add_filter( 'matador_application_fields_defaults', 'mdocs_example_matador_application_default_fields' );

Adjust the labels as needed

add_filter( 'matador_application_fields_structure', function( $fields ) {
   $fields['letter']['label'] = 'Upload Additional document';
   // optional you can update the lables
   $fields['letter']['description'] = 'Attach an additional file, if applicable. Accepted file types are DOC, DOCX, PDF, HTML, and TXT.';
   $fields['privacy_policy_opt_in']['options']['1'] = 'By submitting this application, you consent to the collection, use, and disclosure of your personal information in connection with your current application or any future opportunities that match your skill sets.';

return $fields;
} );

If you wish to allow multiple files to be uploaded then you need to use this code

add_filter( 'matador_application_fields_defaults', function( $fields ) {
  $field_to_add = [ 'files', ];
    return array_merge( $fields, $field_to_add );
} );
Updated on September 25, 2023
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support