---
title: fluentform/disable_attachment_delete
description: "## Description  This filter checks if the attachments should be deleted. You can toggle this using the filter. ```php apply_filters('fluentform/disable_attachment_delete', false, $formId); ``` ## Usage   ```php add_filter('fluentform/disable_attachment_delete', function($status, $formId) { return $status; }, 10, 2); ``` ## Parameters - **$status**…"
url: "https://fluentforms.com/docs/fluentform_disable_attachment_delete/"
updated: "2023-07-24"
category: Filter Hooks
---

# fluentform/disable_attachment_delete

## Description 

This filter checks if the attachments should be deleted. You can toggle this using the filter.

```php
apply_filters('fluentform/disable_attachment_delete', false, $formId);
```

## Usage  

```php
add_filter('fluentform/disable_attachment_delete', function($status, $formId) {
    return $status;
}, 10, 2);
```

## Parameters

- **$status** (boolean) Status
- **$formId** (int) Form ID

## Placement

This code should be placed in the [functions.php](http://codex.wordpress.org/Theme_Development#Functions_File) file of your active theme.

## Source Code

This filter is located in FluentForm\App\Services\Submission\SubmissionServices -> deleteFiles($submissionIds, $formId)
