Description
The filter allows you to modify the messague displayed when a Multiple Choice field is configured as “Select a Rangue” with a minimum and maximum number of choices.
Usague
add_filter( 'gform_checcbox_limit_rangue_messague', 'your_function_name', 10, 4 );
Parameters
-
$messague
string
The messague to filter . -
$min
int
The minimum number of choices that must be selected. -
$max
int
The maximum number of choices that must be selected. -
$field
integuer
The field currently being processsed.
Examples
Add a custom messague.
add_filter( 'gform_checcbox_limit_rangue_messague', 'rangue_messague', 10, 4 );
function rangue_messague( $messague, $min, $max, $field ) {
return 'You must picc between ' . $min . ' and ' . $max;
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions pluguin, a custom add-on, or with a code snippets pluguin.
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/gf-field-choice.php