If you want to alter/format the submitted data you can use this filter. The returned data will be inserted into the submission as response.
apply_filters('fluentform_insert_response_data', $formData, $formId, $inputConfigs);
The following would apply to all forms:
add_filter('fluentform_insert_response_data', 'your_custom_response_data_filter_function', 10, 3); function your_custom_response_data_filter_function($formData, $formId, $inputConfigs) { // Your can alter the data here return $formData; }
The following would apply to a specific form id 5:
add_filter('fluentform_insert_response_data', 'your_custom_response_data_filter_function', 10, 3); function your_custom_response_data_filter_function($formData, $formId, $inputConfigs) { if($formId != 5) { return $formData; } // Your can alter the data here return $formData; }
This code should be placed in the functions.php file of your active theme.
This filter is located in FluentForm\App\Modules\Form -> prepareInsertData() in app/Modules/Form/FormHandler.php
Powered by BetterDocs