| CARVIEW |
Select Language
HTTP/2 301
date: Sat, 27 Dec 2025 22:41:43 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_default_choice_alignment/
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=1bcWlL6fO%2BMNOOK3EYFU5uSRBlHVkDw%2FjS27n%2BmqwXc1YCUPnW1F95G4UCx16zDaiFqMd4ewXAl%2FCEiJekQRteI2ogK3WAuxk5vtZr6v1Y74qXPY"}]}
cf-ray: 9b4c53b25efb3585-BLR
HTTP/2 200
date: Sat, 27 Dec 2025 22:41:44 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=qKu88ECtqOZrCqab61gK0cJHr%2FPKahTHOK%2FnvJa2n19FfwktSSpxv5wRepniHfl7BLT1MRPrwjYuNxeflRe5nbS5RX1raNVH7sLm5fok8n%2FBrbAD"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b4c53b7f9953585-BLR
gform_default_choice_alignment - Gravity Forms Documentation
gform_default_choice_alignment
Description
Allows the default choice alignment to be set for fields that support choice alignment.
Usage
add_filter( 'gform_default_choice_alignment', 'your_function_name', 10, 2);
Parameters
Examples
Set the choice alignment to Horizontal.
add_filter( 'gform_default_choice_alignment', 'make_choices_horizontal', 10, 2 );
function make_choices_horizontal( $default, $form ) {
return 'horizontal';
}
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