How to add support for new field
-
I have added multi-file support to contact form by using blueimp jquery upload plugin in an custom extension and want it be work just like file field of contactform7. I am able to add the field in form creation section as well as able to display. beside this, I am able to store the image just when the user is adding it, the images are stored in wpcf7_uploads folder, I have modified the .htaccess here( may be I still need to modify it to make it secure ) . The problem, is I am not getting these attachments in mail or flamingo . ( In flamingo I can see the field but not the data, may be because, the data is not sent ). what I can gathered information is
The contact form not sending my field data, in network section, I can see
------WebKitFormBoundaryyUR7aqI54KTjtgdZ Content-Disposition: form-data; name="your-multifile[]"; filename="" Content-Type: application/octet-streamfilename is empty that should content file names. so, if possible help me sending this multi-file data in your form submission .
-
Update
removing the bluimp jquery plugin and just adding multifile field sending the data, but that are not included in mail even after adding those into mail settings .
ok, by adding replaceFileInput: false now I can see in network section, my multi-field is sending files when form is submitted, but still unable to get those in email, please give me some idea, when ever you are here.
got the idea
wpcf7_validate_multifilefilter will do the job, I will try to make it work, if there is any example or snippet please let me know, that will be great.-
This reply was modified 9 years, 3 months ago by
Prafulla Kumar Sahu.
if ( $submission = WPCF7_Submission::get_instance() ) { $attachment = wp_upload_dir()['basedir'] . '/wpcf7_uploads/' . $file['name']; $submission->add_uploaded_file( $name, $attachment ); }makes it work, but only last file is going in mail and not the all .
-
This reply was modified 9 years, 3 months ago by
The topic ‘How to add support for new field’ is closed to new replies.