gform_checkbox_limit_min_message

Description

Allows to modify the message displayed when a checkbox is limited to a minimum number of choices.

Usage

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

Parameters

  • $message string
    The message to filter.
  • $min int
    The minimum number of choices that must be selected.
  • $field integer
    The field currently being processed.

Examples

Set a custom message for the Minimum Limit.

add_filter( 'gform_checkbox_limit_min_message', 'min_message', 10, 3 );
function min_message( $message, $number, $field ) {
	return 'You cannot choose less than ' . $number;
}

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/gf-field-choice.php