GF_Field_Email
Source: includes/fields/class-gf-field-email.php:8
Details
- Kind:
class - Namespace:
(global) - Extends: GF_Field
Methods
| Method | Description |
|---|---|
get_form_editor_field_description() | Returns the field's form editor description. |
get_form_editor_field_icon() | Returns the field's form editor icon. |
get_repeater_inputs() | Returns inputs structure for repeater fields only. |
get_field_container_tag() | Returns the HTML tag for the field container. |
is_value_submission_array() | Whether this field expects an array during submission. |
validate() | Validates the field value(s). |
is_email_rejected() | Determines if the given email address matches a value on the rejectable values list. |
get_value_default_if_empty() | If the value is empty, get the default value. |
get_first_input_id() | Removes the "for" attribute in the field label when the confirmation input is enabled. |
get_filter_operators() | Returns the filter operators for the current field. |
Method Reference
get_form_editor_field_description()
public function get_form_editor_field_description()
Returns the field's form editor description.
Returns
string
Since: 2.5
Source: includes/fields/class-gf-field-email.php:23
get_form_editor_field_icon()
public function get_form_editor_field_icon()
Returns the field's form editor icon.
This could be an icon url or a gform-icon class.
Returns
string
Since: 2.5
Source: includes/fields/class-gf-field-email.php:36
get_repeater_inputs()
public function get_repeater_inputs()
Returns inputs structure for repeater fields only.
This is used internally by repeater fields to handle multi-input behavior without breaking backward compatibility.
Returns
array|null
Since: 3.0.0
Source: includes/fields/class-gf-field-email.php:77
get_field_container_tag()
public function get_field_container_tag( $form )
Returns the HTML tag for the field container.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The current Form object. |
Returns
string
Since: 2.5
Source: includes/fields/class-gf-field-email.php:109
is_value_submission_array()
public function is_value_submission_array()
Whether this field expects an array during submission.
Returns
bool
Since: 2.4
Source: includes/fields/class-gf-field-email.php:126
validate()
public function validate( $value, $form )
Validates the field value(s).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | The value to be validated. | |
$form | array | The form being processed. |
Returns
void
Since:
Source: includes/fields/class-gf-field-email.php:142
is_email_rejected()
public function is_email_rejected( $email )
Determines if the given email address matches a value on the rejectable values list.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$email | string | The value to be checked. |
Returns
bool
Since: 2.9.15
Source: includes/fields/class-gf-field-email.php:180
get_value_default_if_empty()
public function get_value_default_if_empty( $value )
If the value is empty, get the default value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | array | string | The field's value. |
Returns
array|string— The default value, if there is one.
Since: 2.6.5
Source: includes/fields/class-gf-field-email.php:433
get_first_input_id()
public function get_first_input_id( $form )
Removes the "for" attribute in the field label when the confirmation input is enabled.
Inputs are only allowed one label (a11y) and the inputs already have labels.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The Form Object currently being processed. |
Returns
string
Since: 2.4
Source: includes/fields/class-gf-field-email.php:464
get_filter_operators()
public function get_filter_operators()
Returns the filter operators for the current field.
Returns
array
Since: 2.4
Source: includes/fields/class-gf-field-email.php:477