Description
Allows managing the Image Choice field input visibility.
Usage
Applies to all forms:
add_filter( 'gform_image_choice_input_visibility', 'your_function_name', 10, 2 );
Applies to a specific form:
add_filter( 'gform_image_choice_input_visibility_FORMID', 'your_function_name', 10, 2 );
Parameters
Examples
Hide the choice inputs for all Image Choice fields.
Note: it will only hide the choice inputs when the choice label visibility setting is set to visible.
add_filter( 'gform_image_choice_input_visibility', function( $input_visibility, $field ) {
return 'hide';
}, 10, 2 );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Since
This filter was added in Gravity Forms 2.9.
Source Code
This filter is located in includes/fields/class-gf-field-image-choice.php