Image attachment repeater
-
Hi,
I have a form with a file upload field and I made a function to attach the uploaded file before sending the email. It looks like this:
function filter_email_attachments( $attachments, $email, $form, $fields ) { $file = af_get_field( 'file' ); $filedir = get_attached_file( $file ); $attachments[] = $filedir; return $attachments; } add_filter( 'af/form/email/attachments/key=form_2c348ef543a81', 'filter_email_attachments', 10, 4 );
This works great, but I was wondering if it is possible to use a repeater field, so a user can upload multiple files. How can I attach multiple files to my function?
Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Image attachment repeater’ is closed to new replies.