Gravity_Forms\Gravity_Forms\Abilities\GF_Abilities_Handler_System
Handles system ability callbacks.
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-system.php:10
Details
- Kind:
class - Namespace:
Gravity_Forms\Gravity_Forms\Abilities
Methods
| Method | Description |
|---|---|
get_system_info() | Get system information. |
list_field_types() | List available field types. |
get_fixed_field_inputs() | Sub-inputs that non-compound field types always store in their default configuration. |
is_addable_field_type() | Whether a field type is one the form editor offers, and so one an agent may add. |
get_compound_field_inputs() | Get default input structures for compound field types. |
Method Reference
get_system_info()
public static function get_system_info( $input=[] )
Get system information.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | [] | The ability input. |
Returns
array
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-system.php:21
list_field_types()
public static function list_field_types( $input=[] )
List available field types.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | [] | The ability input. |
Returns
array
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-system.php:78
get_fixed_field_inputs()
public static function get_fixed_field_inputs()
Sub-inputs that non-compound field types always store in their default configuration.
The forms handler creates these in apply_field_defaults(); listed here so system-field-types reports the same shape agents must submit.
Returns
array— Keyed by field type slug.
Since: 3.2.2
Source: includes/abilities/handlers/class-gf-abilities-handler-system.php:204
is_addable_field_type()
public static function is_addable_field_type( $type )
Whether a field type is one the form editor offers, and so one an agent may add.
Same list as gravityforms/system-field-types. Stored fields of other types (legacy, internal) still round-trip through forms-update.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$type | string | Field type slug. |
Returns
bool
Since: 3.2.2
Source: includes/abilities/handlers/class-gf-abilities-handler-system.php:231
get_compound_field_inputs()
public static function get_compound_field_inputs()
Get default input structures for compound field types.
Compound fields (name, address, time, etc.) store values across multiple sub-inputs. When a field has ID=1, its sub-inputs use IDs like 1.3, 1.6, etc. For form submission, these map to input names: input_1.3, input_1.6.
The ID values here use a placeholder prefix that gets replaced by the actual field ID.
This method is public static because it is shared across handlers — the forms handler uses it in prepare_compound_fields() to auto-populate inputs for API-created compound fields.
Returns
array— Keyed by field type slug.
Since: 3.1.0
Source: includes/abilities/handlers/class-gf-abilities-handler-system.php:270