Skip to main content

GravityKit\EntryTags\EntryTagField

Source: src/EntryTagField.php:18

Details

Properties

PropertyTypeDescription
$type$typestring

Methods

MethodDescription
filter_custom_content()Decodes HTML entities in the content to return valid HTML for entry tags merge tags.
replace_merge_tags()Replaces merge tags with the entry tags field value.
field_value_for_advanced_post_creation()Overrides the field value for Advanced Post Creation.
get_form_editor_field_title()
get_form_editor_field_description()
get_form_editor_field_icon()
get_form_editor_field_type_icon()
add_field_icon()Adds field icon to the GravityView field list.
field_options()Adds choice_display setting to the field.
allow_tag_search()Allows tag search without Search Bar in the View.
get_form_editor_button()
get_form_editor_field_settings()
get_field_input()Returns the field inner markup.
get_value_entry_detail()Formats the entry value for display on the entry detail page and for the {all_fields} merge tag.
get_value_entry_list()
get_tag_filter_link()Returns a tag filter link in GravityView.
get_output_gravityview()Overrides output for GravityView display.
filter_modify_tag_allowed_input_types()Add the Input type allowed for the tag field id.
after_gravityview_entry_edit()Maybe create new tag(s) when the entry is edited in GravityView.

Method Reference

filter_custom_content()

public function filter_custom_content( $content )

Decodes HTML entities in the content to return valid HTML for entry tags merge tags.

Parameters

NameTypeDefaultDescription
$contentstringThe content to decode.

Returns

  • string — The decoded content.

Since: 1.4.1

Source: src/EntryTagField.php:95

replace_merge_tags()

public function replace_merge_tags( $data, $text, $form )

Replaces merge tags with the entry tags field value.

Parameters

NameTypeDefaultDescription
$dataarrayThe data array.
$textstringThe text.
$formarrayThe form array.

Returns

  • array — The data array.

Since: 1.4

Source: src/EntryTagField.php:114

field_value_for_advanced_post_creation()

public function field_value_for_advanced_post_creation( $field_value, $form, $entry, $field_id )

Overrides the field value for Advanced Post Creation.

Parameters

NameTypeDefaultDescription
$field_valuemixedThe field value.
$formarrayThe form array.
$entryarrayThe entry array.
$field_idintThe field ID.

Returns

  • mixed — The field value.

Since: 1.4

Source: src/EntryTagField.php:164

get_form_editor_field_title()

public function get_form_editor_field_title()

Returns

  • string

Since: 1.0.0

Source: src/EntryTagField.php:196

get_form_editor_field_description()

public function get_form_editor_field_description()

Source: src/EntryTagField.php:203

get_form_editor_field_icon()

public function get_form_editor_field_icon()

Returns

  • string

Since: 1.0.0

Source: src/EntryTagField.php:214

get_form_editor_field_type_icon()

public function get_form_editor_field_type_icon(): string

Returns

  • string

Since: $ver$

Source: src/EntryTagField.php:223

add_field_icon()

public function add_field_icon( $fields )

Adds field icon to the GravityView field list.

Parameters

NameTypeDefaultDescription
$fieldsarrayAssociative array of fields.

Returns

  • array

Since: 1.0.0

Source: src/EntryTagField.php:236

field_options()

public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id )

Adds choice_display setting to the field.

Parameters

NameTypeDefaultDescription
$field_optionsarray
$template_idstring
$field_idstring
$contextstring
$input_typestring
$form_idstring

Returns

  • array

Since: 1.4

Source: src/EntryTagField.php:292

public function allow_tag_search( $searchable_fields )

Allows tag search without Search Bar in the View.

Parameters

NameTypeDefaultDescription
$searchable_fieldsarray

Returns

  • array

Since: 1.0.0

Source: src/EntryTagField.php:321

get_form_editor_button()

public function get_form_editor_button()

Returns

  • array

Since: 1.0.0

Source: src/EntryTagField.php:350

get_form_editor_field_settings()

public function get_form_editor_field_settings()

Returns

  • array

Since: 1.0.0

Source: src/EntryTagField.php:364

get_field_input()

public function get_field_input( $form, $value='', $entry=null )

Returns the field inner markup.

Parameters

NameTypeDefaultDescription
$formarrayThe Form Object currently being processed.
$valuestring | array''The field value. From default/dynamic population, $_POST, or a resumed incomplete submission.
$entrynull | arraynullNull or the Entry Object currently being edited.

Returns

  • string — The field input HTML markup.

Since: 1.0.0

Source: src/EntryTagField.php:390

get_value_entry_detail()

public function get_value_entry_detail( $value, $currency='', $use_text=false, $format='html', $media='screen' )

Formats the entry value for display on the entry detail page and for the {all_fields} merge tag.

Parameters

NameTypeDefaultDescription
$valuestring | arrayThe field value.
$currencystring''The entry currency code.
$use_textbool | falsefalseWhen processing choice based fields should the choice text be returned instead of the value.
$formatstring'html'The format requested for the location the merge is being used. Possible values: html, text or url.
$mediastring'screen'The location where the value will be displayed. Possible values: screen or email.

Returns

  • string — The list items, stored within an unordered list.

Since: 1.0.0

Source: src/EntryTagField.php:552

get_value_entry_list()

public function get_value_entry_list( $value, $entry, $field_id, $columns, $form )

Parameters

NameTypeDefaultDescription
$value
$entry
$field_id
$columns
$form

Returns

  • string

Since: 1.0.0

Source: src/EntryTagField.php:634

public function get_tag_filter_link( $tag_value, $form, $field_id, $context, $entry )

Returns a tag filter link in GravityView.

Parameters

NameTypeDefaultDescription
$tag_valuestring | arrayThe tag value.
$formarrayThe form object currently being processed.
$field_idstringThe field or input ID currently being processed.
$contextTemplate_Context | nullIf GravityView is rendering the field, this will be a Template_Context object. Otherwise, null.
$entryarrayThe entry object currently being processed.

Returns

  • string | null — $value The value of the filter link.

Since: 1.1.0

Source: src/EntryTagField.php:655

get_output_gravityview()

public function get_output_gravityview( $output, $context )

Overrides output for GravityView display.

Parameters

NameTypeDefaultDescription
$outputstringThe current output.
$contextTemplate_ContextThe template context this is being called from.

Returns

  • string

Source: src/EntryTagField.php:811

filter_modify_tag_allowed_input_types()

public function filter_modify_tag_allowed_input_types( $input_type, $field_type )

Add the Input type allowed for the tag field id.

Parameters

NameTypeDefaultDescription
$input_typestring | string[]
$field_typestring

Returns

  • string

Since: 1.0.0

Source: src/EntryTagField.php:829

after_gravityview_entry_edit()

static function after_gravityview_entry_edit( $form, $entry_id, $edit_entry )

Maybe create new tag(s) when the entry is edited in GravityView.

Parameters

NameTypeDefaultDescription
$formarrayGravity Forms form.
$entry_idstringID of the entry that was updated.
$edit_entryGravityView_Edit_Entry_RenderEdit Entry instance.

Returns

  • void

Since: 1.1.0

Source: src/EntryTagField.php:850