dynamically attach multiple files
-
Able to attach a single file dynamically in function.php file in my child theme directory, but having problems adding another file.
Tried putting a /n between the file names, but that didn’t work.
Please help.Here’s a snippet of the code I’m using:
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
// get the dropdown menu value and the corresponding instruction file $myDocName = $WPCF7_Form->posted_data['TeamType'].".pdf"; $WPCF7_Form->mail_2['attachments'] = "uploads/Instructions/".$myDocName ; // attach team sign up sheet $WPCF7_Form->mail_2['attachments'] .= "/nuploads/Instructions/TeamSignUp.pdf";
My site:
https://www.staging.secretfamiliesmc.org/team-sign-up/Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘dynamically attach multiple files’ is closed to new replies.