GF_Field_Textarea
Source: includes/fields/class-gf-field-textarea.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. |
rte_plain_text_value() | Get TinyMCE "plain text" value for submitted HTML. |
remove_textarea_texturize() | Adds 'textarea' to the list of tags that should not be texturized. |
get_value_entry_detail() | Format the entry value for display on the entry detail page and for the {all_fields} merge tag. |
get_value_merge_tag() | Format the entry value for when the field/input merge tag is processed. Not called for the {all_fields} merge tag. |
is_rich_edit_enabled() | Determines if the RTE can be enabled for the current field and user. |
filter_user_option_rich_editing() | Filter the rich_editing option for the current user. |
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-textarea.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-textarea.php:36
rte_plain_text_value()
public function rte_plain_text_value( $html )
Get TinyMCE "plain text" value for submitted HTML.
Mirrors JS code: editor.getContent({ format: 'text' }).trim().length
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$html | string | The HTML content from the RTE. |
Returns
string— The plain text value of the specified $html string.
Since: 3.0.0
Source: includes/fields/class-gf-field-textarea.php:241
remove_textarea_texturize()
public static function remove_textarea_texturize( $tags )
Adds 'textarea' to the list of tags that should not be texturized.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$tags | array | The list of tags that should not be texturized. |
Returns
array— The updated list of tags.
Since: 2.9.1
Source: includes/fields/class-gf-field-textarea.php:269
get_value_entry_detail()
public function get_value_entry_detail( $value, $entry=[], $use_text=false, $format='html', $media='screen' )
Format the entry value for display on the entry detail page and for the {all_fields} merge tag.
Return a value that's safe to display for the context of the given $format.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | array | The field value. | |
$entry | array | [] | The entry. |
$use_text | bool | false | false | When processing choice based fields should the choice text be returned instead of the value. |
$format | string | 'html' | The format requested for the location the merge is being used. Possible values: html, text or url. |
$media | string | 'screen' | The location where the value will be displayed. Possible values: screen or email. |
Returns
string
Since:
1.92.9.29(Changed the second parameter $currency (string) to $entry (array).)
Source: includes/fields/class-gf-field-textarea.php:369
get_value_merge_tag()
public function get_value_merge_tag( $value, $input_id, $entry, $form, $modifier, $raw_value, $url_encode, $esc_html, $format, $nl2br )
Format the entry value for when the field/input merge tag is processed. Not called for the {all_fields} merge tag.
Return a value that is safe for the context specified by $format.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | array | The field value. Depending on the location the merge tag is being used the following functions may have already been applied to the value: esc_html, nl2br, and urlencode. | |
$input_id | string | The field or input ID from the merge tag currently being processed. | |
$entry | array | The Entry Object currently being processed. | |
$form | array | The Form Object currently being processed. | |
$modifier | string | The merge tag modifier. e.g. value | |
$raw_value | string | array | The raw field value from before any formatting was applied to $value. | |
$url_encode | bool | Indicates if the urlencode function may have been applied to the $value. | |
$esc_html | bool | Indicates if the esc_html function may have been applied to the $value. | |
$format | string | The format requested for the location the merge is being used. Possible values: html, text or url. | |
$nl2br | bool | Indicates if the nl2br function may have been applied to the $value. |
Returns
string
Since: Unknown
Source: includes/fields/class-gf-field-textarea.php:412
is_rich_edit_enabled()
public function is_rich_edit_enabled()
Determines if the RTE can be enabled for the current field and user.
Returns
bool
Since: 2.2.5.14
Source: includes/fields/class-gf-field-textarea.php:441
filter_user_option_rich_editing()
public function filter_user_option_rich_editing( $value )
Filter the rich_editing option for the current user.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | The value of the rich_editing option for the current user. |
Returns
string
Since: 2.2.5.14
Source: includes/fields/class-gf-field-textarea.php:465
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-textarea.php:478