How to Solve the File Upload & No Attachment Problem in Contact Form 7?

Contact form 7 is one of the beloved WordPress plugins well liked by many Headway Themes users. It is not only free but easy to install and use but many users struggled with one problem – its file upload feature.

The most common scenario is:

  1. Added a file upload to the contact form. When the form was successfully sent and received by recipient, there was no file attachment found.
  2. Some users saw a “Your message was sent successfully. Thanks.” displayed after submitting their form but recipient was unable to find the file when the email received.
Before you jump into twisting the PHP file or changing the permission of your plugin folder, there is one simple step that many users have overlooked. You may like to try the following steps first before doing anything drastic. However, the following steps assumed you have already created a contact form in your WordPress Dashboard. If you have not done so, please create one now with upload feature before going through the steps below.

  1. Log into your WordPress dashboard and click on “Contact Form”.
  2. Click on the form you have created with the “Upload File” feature.
  3. Once you are in the editing screen, scroll down and under “Mail” section at the left hand side, look for “File Attachment”.
    (This is the step that many users had missed which caused the missing file attachment problem.)
  4. Make sure the “File Attachment” contains the file upload tag name you have created previously. By default, its tag name consists of “file” followed by some numeric such as “file-19”.
  5. In this example, we are creating a job application form and applicants can upload their resume using the file upload.
  6. The file upload tag name is changed to “UploadResume” so the tag [uploadresume] is typed in the attachment field box as show below.

  1. Once you are done, save the changes and you are ready to test your form.
  2. Before that, you might like to enter your own personal email address at the “To” field under the “Mail” section when testing the form. When everything is working fine, you can change back to the actual email address.
  3. Go to the browser and enter some data, upload a document then submit the form.
  4. Once the form is successfully submitted, it will go directly into your inbox.
  5. Open up the email in your inbox and you can see an attachment attached to it.
The above steps are not unique to Headway Themes users; it is also applicable to any WordPress users.

Comments

  1. Hi!
    great explanation, but I have one question. Is it possible that visitor send a .dwg type of files, and how

    ReplyDelete
  2. No, I don't think so. You can see the list format accepted by CF7 at the developer's blog http://contactform7.com/file-uploading-and-attachment/.

    ReplyDelete
  3. In mail2 option how do you get the file attachment to work for autorespond?

    ReplyDelete
  4. Thank you so much!!!!! I've been trying to figure this out for hours!

    ReplyDelete

Post a Comment

Popular posts from this blog

Headway Visual Editor not Loading in the Browser