This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this hook to determine whether file protection will prevent file switching sitewide or only for specific forms where this option is enabled.
Usage
add_filter( 'frm_stop_file_switching', '__return_true' );
Parameters
- $args (array)
- form_id
- field_id
Examples
Prevent file switching for all forms
Use this example to prevent file switching for all forms, even when file protection is disabled.
add_filter( 'frm_stop_file_switching', '__return_false' );
Prevent file switching with file protection
Use this example if you would like the same files to be reused on multiple entries, when file protection is enabled.
add_filter( 'frm_stop_file_switching', '__return_true' );