Description #
This action fires after the $insertData is inserted into the database. In this action Fluent Form’s own defined integrations fires and broadcast emails. All the other integrations actually broadcasted using smart background processing. If you want to connect your submission data to 3rd party servers, it’s highly recommended to build an addon to use the background processing feature of Fluent Forms.
/*
* Source Action
*/
do_action('fluentform/submission_inserted', $insertId, $this->formData, $this->form);
Usage #
The following would apply to all forms:
add_action('fluentform/submission_inserted', 'your_custom_after_submission_function', 20, 3);
function your_custom_after_submission_function($entryId, $formData, $form)
{
// DO your stuffs here
}
The following would apply to a specific form id: 5:
add_action('fluentform/submission_inserted', 'your_custom_after_submission_function', 20, 3);
function your_custom_after_submission_function($entryId, $formData, $form)
{
if($form->id != 5) {
return;
}
// DO your stuffs here
}
Parameters #
- $entryId (integer) Entry ID of this response
- $formData (array) Entry Response as key-value pairs array as input name as array key
- $form (Object) The $form Object
Placement #
This code should be placed in the functions.php file of your active theme.
Source Code #
This action is located in fluentform/app/Services/Form/SubmissionHandlerService.php