Description #
This filter returns the file type option for the upload field. Using fluentform/file_type_options you can add more file types that are not supported by default.
apply_filters('fluentform/file_type_options', $fileTypeOptions);
Usage #
add_filter('fluentform/file_type_options', function ($types) {
$types[] = [
'label' => __('Autocad Files (dwg)', 'fluentform'),
'value' => 'dwg',
];
return $types;
});
Parameters #
- $types (array) File Types
Placement #
This code should be placed in the functions.php file of your active theme.
Source Code #
This filter is located in app/Services/FormBuilder/ValidationRuleSettings.php