---
title: "File Attachments & Secure Documents"
description: "Nelx JFB Email Templates can attach files uploaded through JetFormBuilder to the email sent by a template. You choose which upload fields belong to the email. If the form also uses **[Nelx Secure Document Storage](https://nelxstudio.com/docs/nelx-notification-system-integration/)**, the plugin can keep the…"
url: "https://nelxstudio.com/docs/file-attachments-secure-documents/"
updated: "2026-10-05"
category: Nelx JFB Email Templates
---

# File Attachments & Secure Documents

Nelx JFB Email Templates can attach files uploaded through JetFormBuilder to the email sent by a template.

You choose which upload fields belong to the email. If the form also uses **[Nelx Secure Document Storage](https://nelxstudio.com/docs/nelx-notification-system-integration/)**, the plugin can keep the stored file protected while still sending the attachment with its original filename.

## Before You Start

Make sure:

- the JetFormBuilder form already contains the Media Field or upload field you need;
- the correct form is selected in your email template;
- the form can upload the file successfully before you test the email attachment.

Open:

**WordPress Admin → Nelx JFB Email Templates → Form Templates**

Then open the template you want to configure.

## Add a File Attachment

Find **File Attachments** inside the template.

1. Open the attachment field selector.
2. Choose the upload field from the selected JetFormBuilder form.
3. Click **Add Attachment**.
4. Repeat if the email should include files from more than one upload field.
5. Save the template.

The attachment selector becomes available after you select the JetFormBuilder form.

If the form does not contain a suitable upload field, there is nothing to attach.

![File attachment](https://nelxstudio.com/wp-content/uploads/2026/10/nelx-jfb-email-tempates-file-attachment.jpg)

## More Than One Upload Field

A template can include more than one attachment field.

For example, an application form might collect:

- `identity_document`
- `certificate`
- `supporting_letter`

Add each field that should be attached to the email.

You do not need a separate email template for every file field.

## Media Fields Inside a Repeater

If the Media Field sits inside a JetFormBuilder Repeater, use the **Repeater Field** as the attachment field rather than the nested Media Field by itself.

For example:

```
task_attachment
└── task_file
```

where:

- `task_attachment` is the Repeater Field;
- `task_file` is the Media Field inside that repeater.

Use:

`task_attachment`

for the attachment setting.

This lets the plugin resolve files from the repeater rows instead of looking for a top-level `task_file` value that does not exist on its own.

For displaying repeater data inside the email body, see **[Repeater Fields in Email Templates](https://nelxstudio.com/docs/repeater-fields-in-email-templates/)**.

## Original Filenames

A file may be stored under a different filename from the one the user originally uploaded.

When the original filename is available, Nelx JFB Email Templates uses it for the email attachment.

For example, a securely stored file may have an internal filename such as:

```
9f3c2a8b7d.pdf
```

while the recipient sees:

```
company-certificate.pdf
```

The stored file does not need to be renamed just to make the email attachment readable.

## Using Nelx Secure Document Storage

Nelx Secure Document Storage is optional.

Without it, file uploads follow the normal WordPress and JetFormBuilder attachment flow.

When Nelx Secure Document Storage is active and the form is configured for secure storage, Nelx JFB Email Templates works with that secure-file flow instead of moving the file back into ordinary public storage.

With Modern Media Upload in **Live Upload** mode, the process is:

1. The file is uploaded into protected pending storage.
2. The user completes the form.
3. JetFormBuilder verifies and processes the submission.
4. The secure file is finalized through Nelx Secure Document Storage.
5. The original filename is retained for email attachments and controlled file access.

This keeps the secure storage rules with Nelx Secure Document Storage while allowing the email template to use the file.

## Secure Storage and the Email Attachment

The filename used for secure storage and the filename shown to the email recipient can be different.

When necessary, the email system prepares the file for sending with the preserved original name. The temporary email copy is cleaned up after the email is processed.

The protected stored file remains under the secure-storage rules.

## Guest Uploads

Attachments can also come from forms submitted by guests when the JetFormBuilder Media Field allows guest uploads.

The permission still comes from the Media Field itself. Enabling an attachment in the email template does not give a visitor permission to upload a file.

If the Media Field only allows users with a particular capability, a guest cannot bypass that rule through Nelx JFB Email Templates.

For the live upload experience used by guests and logged-in users, see **[Modern Media Upload](https://nelxstudio.com/docs/modern-media-upload/)**.

## Modern Media Upload Is Separate From the Attachment Setting

These two settings solve different parts of the process:

| Setting | What it controls |
| --- | --- |
| **Modern Media Upload** | How the visitor uploads and sees the file on the form |
| **File Attachments** | Which form uploads should be included with the email |

You can use normal JetFormBuilder uploads and still attach files to emails.

You can also use Modern Media Upload and attach those uploaded files to the template.

## Existing Files in Edit Forms

A JetFormBuilder form may load an existing Media Field value when a user edits an existing item.

Modern Media Upload can show those saved files in the uploader without uploading them again.

If the user leaves the existing file in place, JetFormBuilder keeps the existing value.

If the user removes it through the uploader, the plugin uses JetFormBuilder's normal removal behavior for that preset file.

The uploader side of this is covered in [**Modern Media Upload**.](https://nelxstudio.com/docs/modern-media-upload/)

## If an Attachment Is Missing From the Email

Check these points:

1. Make sure the correct JetFormBuilder form is selected in the template.
2. Confirm that the upload field has been added under **File Attachments**.
3. Make sure the form submission actually contains a file.
4. If the field is inside a repeater, add the Repeater Field rather than only the nested Media Field.
5. Confirm that the upload itself completes successfully before the form is submitted.
6. If the form uses Nelx Secure Document Storage, confirm that the form is included in its secure-storage settings.
7. Test with the template active and save your changes before submitting the form again.

## Where to Go Next

For drag and drop, live progress, guest uploads, repeater uploads, and existing files in edit forms, continue with **[Modern Media Upload](https://nelxstudio.com/docs/modern-media-upload/)**.

For displaying file information inside repeater content, see **[Repeater Fields in Email Templates](https://nelxstudio.com/docs/repeater-fields-in-email-templates/)**.

For a basic email template setup, see **[Creating Your First Email Template](https://nelxstudio.com/docs/creating-your-first-email-template/)**.
