• 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-stream

    filename is empty that should content file names. so, if possible help me sending this multi-file data in your form submission .

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Prafulla Kumar Sahu

    (@prafulla)

    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 .

    Thread Starter Prafulla Kumar Sahu

    (@prafulla)

    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.

    Thread Starter Prafulla Kumar Sahu

    (@prafulla)

    got the idea wpcf7_validate_multifile filter 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.

    Thread Starter Prafulla Kumar Sahu

    (@prafulla)

    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 .

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add support for new field’ is closed to new replies.