Multiple File Upload for Contact Form 7

Описание

Give any Contact Form 7 form a clean multiple-file field. Visitors drag files in or click to browse. You control the button text, file types, size limits, and where each form stores uploads.

Upload that feels easy

  • Drag and drop, or click the browse button
  • Several files in one field — no extra [file] tags
  • Custom button label (default: Choose files) and CSS class
  • Optional or required: [hbwa_mfile] / [hbwa_mfile*]
  • Limits you set: file types, size per file, and max number of files

Save files your way — per form

Each form has its own Multi-file Upload tab. Turn saving on only where you need it.

  • Media library — add uploads to WordPress Media
  • Folder under wp-content — keep files in a path you choose, such as uploads/invoices

Folders that stay organized

When you save under wp-content, pick how subfolders are created:

  • By year
  • By year / month (same idea as the WordPress media library)
  • By year / month / day
  • By logged-in user
  • By user / year
  • By form name (slug, for example contact-form-1)
  • Custom pattern, such as {year}/{form_slug}

Name saved files with tokens like {filename}, {date}, {time}, and {random}. The original extension is always kept.

Email that is ready to open

  • Attach files in the Mail tab with the matching mail-tag, for example [attachments]
  • Put the same tag in the message body
  • When saving is on, that tag becomes a link to open each file instead of a plain name

Built for Contact Form 7

  • multi-file button in the form-tag generator
  • Works with Mail and Mail (2)
  • Settings apply to that form only — other forms stay unchanged

Requirements

How to use the shortcode

  1. Edit a Contact Form 7 form.
  2. Click the multi-file button in the form-tag generator.
  3. Set the field name, button label, CSS class, file types, size limit, and max files, then insert the tag.
  4. In the Mail tab, add the same field name under File attachments (for example [attachments]).
  5. Optionally add the same mail-tag in the message body.
  6. Open the Multi-file Upload tab if you want to keep copies: enable Save uploaded files, then choose Media library or a folder under wp-content.

Basic shortcode examples

Optional field:

[hbwa_mfile attachments]

Required field:

[hbwa_mfile* attachments]

Custom button label and class:

[hbwa_mfile* attachments class:my-upload-btn "Select files"]

With options:

[hbwa_mfile* attachments filetypes:jpg|jpeg|png|pdf|doc|docx limit:2mb maxfiles:5 "Choose file"]

Shortcode options

  • Quoted value — browse button label (default: Choose files)
  • class: — CSS class added to the file input and the browse button
  • filetypes: — pipe-separated extensions (example: jpg|jpeg|png|pdf)
  • limit: — max size per file (example: 2mb, 500kb, or bytes)
  • maxfiles: — maximum number of files allowed in one submission

Save files (per form)

On the form’s Multi-file Upload tab:

  1. Enable Save uploaded files.
  2. Choose one destination:
    • Media library
    • Folder under wp-content — base path relative to wp-content (for example uploads/invoices), then organize subfolders by year, month, user, form name slug, or a custom pattern
  3. Optional File name pattern (default {filename}). The original extension is always kept.

When saving is enabled, the mail-tag in the message body outputs links to open each file.

Uploaded files are sent as real email attachments when Contact Form 7 file uploading is enabled for that mail template. Make sure your hosting PHP upload limits (upload_max_filesize, post_max_size) allow the sizes you configure.

Guidelines

  • Always put the matching mail-tag in File attachments if you want files attached to the email.
  • Use [hbwa_mfile*] when at least one file is required.
  • Keep maxfiles: and limit: realistic for your server and mailbox size limits.
  • Restrict filetypes: to what you actually need (for example images and PDFs only).
  • This field does not replace CF7’s native [file] tag — use [hbwa_mfile] when you need multiple files and drag-and-drop.

Author: hell0bunny

Скриншоты

Установка

  1. Upload the bunny-co-multiple-file-upload-cf7 folder to /wp-content/plugins/
  2. Activate Multiple File Upload for Contact Form 7 through the Plugins screen
  3. Make sure Contact Form 7 is installed and active
  4. Edit a Contact Form 7 form
  5. Click the multi-file button in the form-tag generator
  6. Insert the tag into the Form tab
  7. Add the matching mail-tag to the Mail tab File attachments field (and optionally the message body)
  8. Optional: open the form’s Multi-file Upload tab to save files to the media library or a wp-content folder

Часто задаваемые вопросы

Are uploaded files attached to the email?

Yes. Add the field’s mail-tag (for example [attachments]) to the Mail tab File attachments box. Contact Form 7 will attach the uploaded files to the notification email. Place the same mail-tag in the message body to show file names, or openable links when Save uploaded files is enabled on that form.

How do I make the upload required?

Use the required form-tag: [hbwa_mfile* your-field-name ...].

How do I change the Choose files button text?

In the tag generator, set Button label. If you leave it empty, the button shows “Choose files”. Example: [hbwa_mfile attachments "Select files"].

Where are files stored?

By default they stay in Contact Form 7’s temporary folder and are attached to the email. On the form’s Multi-file Upload tab, enable Save uploaded files and choose the media library or a folder under wp-content. You can organize that folder by year, month, user, or the form name slug.

Can each form save files differently?

Yes. Saving, destination, folder layout, and file name are set on that form’s Multi-file Upload tab only.

Отзывы

Нет отзывов об этом плагине.

Участники и разработчики

«Multiple File Upload for Contact Form 7» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

Перевести «Multiple File Upload for Contact Form 7» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

1.1.0

  • Custom browse button label and class
  • Per-form save option: media library or a folder under wp-content
  • Organize saved folders by year, month, user, form name slug, or custom tokens
  • Custom saved file names
  • Mail-tag outputs file links when saving is enabled

1.0.0

  • Initial release: [hbwa_mfile] multi-file field with drag-and-drop, limits, and CF7 mail attachment support