Gravity_Forms\Gravity_Forms\Settings\Fields\Field_Select
Source: includes/settings/fields/class-field-select.php:15
Details
- Kind:
class - Namespace:
Gravity_Forms\Gravity_Forms\Settings\Fields - Extends:
Select
Properties
| Property | Type | Description |
|---|---|---|
$type | string | Field type. |
$args | array | Drop Down arguments. |
Methods
| Method | Description |
|---|---|
__construct() | Initialize Field Select field. |
get_default_choice() | Returns the field to be selected by default for Field Select fields based on matching labels. |
get_form_fields_as_choices() | Prepares a form's fields as choices. |
Method Reference
__construct()
public function __construct( $props, $settings )
Initialize Field Select field.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$props | array | Field properties. | |
$settings | \Gravity_Forms\Gravity_Forms\Settings\Settings | Settings instance. |
Since: 2.5
Source: includes/settings/fields/class-field-select.php:45
get_default_choice()
public function get_default_choice()
Returns the field to be selected by default for Field Select fields based on matching labels.
Returns
string|null
Since: 2.5
Source: includes/settings/fields/class-field-select.php:125
get_form_fields_as_choices()
public function get_form_fields_as_choices( $form )
Prepares a form's fields as choices.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | Form object. |
Returns
array
Since: 2.5
Source: includes/settings/fields/class-field-select.php:201