User Select Field Type

Introduction

The user_select type field, part of the Settings API, allows the user to select a user object from a drop-down menu. When the setting loads, it lists the first 10 users on the website and offers an option for “Logged In User.”

Example

This field will output a select field containing users.

array(
	'name'          => 'user',
	'label'         => esc_html__( 'User', 'yournamespace' ),
	'type'          => 'user_select',
	'required'      => false,
	'default_value' => 'logged-in-user',
),

Filters

The filter gform_user_select_query_params allows to filter the parameters for the query for the initial list of users in the user select dropdown.

Since

Added in Gravity Forms version 2.9.5