---
title: fluentform/before_insert_submission
description: "## Description This action fires after the submission validation is completed and just before insert submission data to the database. If you want to do extra validation of the submitted data then you can catch this action hook and do…"
url: "https://fluentforms.com/docs/fluentform_before_insert_submission/"
updated: "2025-01-10"
category: Action Hooks
tags:
  - Action Hook
  - Submission Hook
---

# fluentform/before_insert_submission

## Description

This action fires after the submission validation is completed and just before insert submission data to the database. If you want to do extra validation of the submitted data then you can catch this action hook and do your staff.

```php
/*
* Source Action
*/
do_action('fluentform/before_insert_submission', $insertData, $data, $form);
```

## Usage

The following would apply to all forms:

```php
add_action('fluentform/before_insert_submission', 'your_custom_before_submission_function', 10, 3);

function your_custom_before_submission_function($insertData, $data, $form)
{
   // DO your stuffs here
}
```

The following would apply to a specific form id: 5:

```php
add_action('fluentform/before_insert_submission', 'your_custom_before_submission_function', 10, 3);

function your_custom_before_submission_function($insertData, $data, $form)
{
   if($form->id != 5) {
      return;
   }

   // DO your stuffs here
}
```

## Parameters

- **$insertData** (array) [submission_data Array](https://fluentforms.com/docs/submission_data-array/)

- **$data** (array) $_POST['data'] Form Submission

- **$form**  (Object) [The $form Object](https://fluentforms.com/docs/form-object/)

## 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 action is located in fluentform/app/Services/Form/SubmissionHandlerService.php
