Check upload file
-
Hi all.
I have add to my donation form a custom field in order to upload a file, but I can’t to validate the field.
This code not work with input field
function give_myprefix_validate_custom_fields( $required_fields, $form_id ) { if ( $form_id == 754) { $required_fields['fileUpload'] = array( 'error_id' => 'invalid_give_referral', 'error_message' => __( 'Please tell us how you heard about Girl Develop It.', 'give' ), ); } return $required_fields; } add_filter( 'give_donation_form_required_fields', 'give_myprefix_validate_custom_fields', 10, 2 );
fileUpload is a <input id=”fileToUpload” name=”fileToUpload” type=”file” accept=”.pdf,.jpg”/>
Suggestion?
Thanks,
Marco
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Check upload file’ is closed to new replies.