Description #
This filter returns the entry statutes. By default, Fluent Forms has the following statuses for form entries
- Unread
- Read
- Trashed
$statuses = apply_filters('fluentform/entry_statuses_core', [
'unread' => 'Unread',
'read' => 'Read'
], $form_id);
If you need to add custom status then you can use this filter hook.
Usage #
The following code will add a new status for all your forms.
add_filter('fluentform/entry_statuses_core', function ($statuses) {
$statuses['important'] = 'Important';
return $statuses;
}, 10, 1);
If you want to add a specific status to a specific form (say form id 3) only then you can use the following code:
add_filter('fluentform/entry_statuses_core', function ($statuses, $formId) {
if($formId == 3) {
$statuses['important'] = 'Important';
}
return $statuses;
}, 10, 2);
Parameters #
- $statuses (array) key-value paired array of the statuses
- $formId (integer) Form id
Placement #
This code should be placed in the functions.php file of your active theme.
Source Code #
This filter is located in FluentForm\App\Helpers\Helper -> getEntryStatuses($form_id = false)