How do double the height for all of my Multi Select Category fields? [RESOLVED]

I have a lot of categories with parent-child relationships. The default only shows 7 categories and I would like to show 14 categories.

Hi Charles. You can use the gform_field_content filter to change the number of items to 14, from the default of 7. The code would look like this:

add_filter( 'gform_field_content', function ( $field_content, $field ) {

	if ( $field->type == 'multiselect' ) {
		return str_replace( "size='7'", "size='14'", $field_content );

	return $field_content;
}, 10, 2 );

This is PHP code that can be added to your theme functions.php file, or you can use a plugin such as this one to keep the code separate from the theme: Code Snippets – WordPress plugin |

Please see this article for additional information on placing PHP snippets:

Let us know if you have any other questions.

Thanks Chris for your great help!

1 Like