gravityflow_role_field

The Role Field, by default, will display all users. If you need to filter the items you can use the following filter.

The following example ensure that only two roles are displayed:

add_filter( 'gravityflow_role_field', 'sh_gravityflow_role_field', 10, 3 );
function sh_gravityflow_role_field( $roles, $form_id, $field ) {
	$roles = array(
		array( 'value' => 'administrator', 'text' => 'Administrators' ),
		array( 'value' => 'editor', 'text' => 'Editors' ),
	);
	return $roles;
}

Still need help? Contact Support Contact Support