Description
This filter is executed when the form editor is loaded, when creating the author drop down selection for the Post Fields. Use this hook to change the list of authors displayed in the drop down by filtering the $args parameter to be passed to the wp_dropdown_users($args) function.
Usage
Applies to all forms
<?php
add_filter("gform_author_dropdown_args", set_users);
?>
Applies to a specific form. In this case, form Id 5
<?php
add_filter("gform_author_dropdown_args_5", set_users);
?>
Parameters
$args
- (Array) The args to be filtered, in the format expected by the wp_dropdown_users() WP function.
Examples
This example changes the author drop down so that it includes two users (Ids 1 and 8).
<?php
add_filter("gform_author_dropdown_args", set_users);
function set_users($args){
$args["include"] = "1,8";
return $args;
}
?>
Source Code
This filter is located in form_detail.php