The gform_post_select_initial_count filter in Gravity Forms allows setting the default number of posts to retrieve when the Settings API renders a field of type post_select.
Usage
add_filter('gform_post_select_initial_count', 'your_function_name');
Parameters
- $count (integer) – The number of posts to retrieve. Default value is 5.
More information
See Gravity Forms Docs: [gform_post_select_initial_count](https://docs.gravityforms.com/ link)
Examples
Set the initial number of posts to 10
This example sets the initial number of posts to 10.
add_filter('gform_post_select_initial_count', function($count) { return 10; });
Set the initial number of posts to 15
This example sets the initial number of posts to 15.
add_filter('gform_post_select_initial_count', function($count) { return 15; });
Set the initial number of posts to 20
This example sets the initial number of posts to 20.
add_filter('gform_post_select_initial_count', function($count) { return 20; });
Set the initial number of posts to 25
This example sets the initial number of posts to 25.
add_filter('gform_post_select_initial_count', function($count) { return 25; });
Set the initial number of posts to 30
This example sets the initial number of posts to 30.
add_filter('gform_post_select_initial_count', function($count) { return 30; });