bookmark_bordergform_plupload_settings

Description

The filter gform_pluploads_settings allows the initialization settings(file size, file count, browse button, drag and drop, and more) for PlUpload to be changed. PlUpload is used when the allow multiple files option is enabled.

Usage

The following would apply to all forms.

add_filter( 'gform_plupload_settings', 'your_function_name', 10, 3 );

To limit the scope of your function to a specific form, append the form id to the end of the hook name. (format: gform_plupload_settings_FORMID)

add_filter( 'gform_plupload_settings_75', 'init_plupload_settings', 10, 3 );

Parameters

Examples

add_filter( 'gform_plupload_settings', 'init_plupload_settings', 10, 3 );

function init_plupload_settings( $settings, $form_id, $field ){
	$settings['filters']['max_file_size'] = '100kb';
	return $settings;
}

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in GF_Field_FileUpload::get_field_input() in includes/fields/class-gf-field-fileupload.php