• Hello,

    I am using the wpcf7_posted_data filter in functions.php to obtain form submission data. The issue I am facing is that when a file is uploaded to a field such as:

    [file Photo-1 filetypes:gif|png|jpg|jpeg|mp4]

    the data is empty (i.e. the string ”) when the wpcf7_posted_data filter is run. This is not the case for text, email and textarea fields; they all have the correct data.

    Also, the file that is uploaded does appear as an attachment in the email that is sent to the form recipient. It only shows as empty in the wpcf7_posted_data array.

    Why could this be?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter viralshahpolaris

    (@viralshahpolaris)

    Thanks for your reply @takayukister

    In the article that you linked to, it says:

    “Contact Form 7 moves the uploaded file to a temporary folder. At this point, Contact Form 7 attaches the file to the mail and sends it. After these procedures, Contact Form 7 then removes the file from the temporary folder.”

    Is there any way to get the name of the file that has been uploaded to the temporary folder? Also, is it possible to prevent the file from being removed from the temporary folder?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘wpcf7_posted_data filter has no data for file fields’ is closed to new replies.