GF_Field_Password
Source: includes/fields/class-gf-field-password.php:7
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. |
get_value_save_input() | Sanitize and format the value before it is saved to the Entry Object. |
delete_passwords() | |
get_first_input_id() | Removes the "for" attribute in the field label. |
stash_passwords() | Passwords are not saved to the database and won't be available in the runtime $entry object unless we stash and |
hydrate_passwords() | Hydrate the stashed passwords back into the runtime $entry object that has just been saved and retrieved from the |
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-password.php:24
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-password.php:56
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-password.php:76
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-password.php:108
get_value_save_input()
public function get_value_save_input( $value, $form, $input_name, $entry_id, $entry, $repeater_index='' )
Sanitize and format the value before it is saved to the Entry Object.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | The value to be saved. | |
$form | array | The Form object currently being processed. | |
$input_name | string | The input name used when accessing the $_POST. | |
$entry_id | int | The ID of the entry currently being processed. | |
$entry | array | The entry currently being processed. | |
$repeater_index | string | '' | The repeater index if the field is inside a repeater. |
Returns
array|string— The sanitized and formatted input value to be saved.
Since: 3.0.0
Source: includes/fields/class-gf-field-password.php:423
delete_passwords()
public static function delete_passwords( $entry, $form )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry | |||
$form |
Deprecated: 2.4.16
Source: includes/fields/class-gf-field-password.php:448
get_first_input_id()
public function get_first_input_id( $form )
Removes the "for" attribute in the field label.
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-password.php:483
stash_passwords()
public static function stash_passwords( $form )
Passwords are not saved to the database and won't be available in the runtime $entry object unless we stash and
rehydrate them into the $entry object after it has been retrieved from the database.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form |
Since: 2.4.16
Source: includes/fields/class-gf-field-password.php:513
hydrate_passwords()
public static function hydrate_passwords( $entry )
Hydrate the stashed passwords back into the runtime $entry object that has just been saved and retrieved from the
database.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry |
Returns
array— $entry
Since: 2.4.16
Source: includes/fields/class-gf-field-password.php:541