| CARVIEW |
Select Language
HTTP/2 301
date: Sat, 27 Dec 2025 09:50:49 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_checkbox_limit_max_message/
server: cloudflare
x-redirect-by: Yoast SEO Premium
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: strict-origin-when-cross-origin
fastcgi-cache: MISS
strict-transport-security: max-age=31536000; includeSubDomains
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Ob1hOSJKKejtBnCkI9RAUgYhgeCH5zZ9DxImoFyLS08k9U8MzsWcETgnXg2U4fzY8eeeBKKqJfJa2w9ND%2FAtfWAt%2F9s%2FVVUusI%2BLAMmEEnbQJweo"}]}
cf-ray: 9b47ea70bbb1d3d4-BLR
HTTP/2 200
date: Sat, 27 Dec 2025 09:50:49 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=6WjAfJCBrFEPnXS%2FKsmMVT54njMWYFybtvmqA1tzgnSVgSbVbQMIai421U7gtwyiL2ZBGawU7NJSTAXizI%2FA0xBMM%2FO7goCy8Wlg4blqbUj8pIQk"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b47ea76da96d3d4-BLR
gform_checkbox_limit_max_message - Gravity Forms Documentation
gform_checkbox_limit_max_message
Description
Allows to modify the message displayed when a checkbox is limited to a maximum number of choices.
Usage
add_filter( 'gform_checkbox_limit_max_message', 'your_function_name', 10, 3 );
Parameters
- $message string
The message to filter. - $max int
The maximum number of choices that must be selected. - $field integer
The field currently being processed.
Examples
Set a custom message for the Maximum Limit.
add_filter( 'gform_checkbox_limit_max_message', 'max_message', 10, 3 );
function max_message( $message, $number, $field ) {
return 'You cannot choose more 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