Skip to main content

GF_Field_Website

Source: includes/fields/class-gf-field-website.php:8

Details​

  • Kind: class
  • Namespace: (global)
  • Extends: GF_Field

Properties​

PropertyTypeDescription
$repeatableboolWhether the field can be used in a repeater.

Methods​

MethodDescription
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_value_entry_detail()Format the entry value for display on the entry detail page and for the {all_fields} merge tag.
get_value_save_input()Sanitize and format the value before it is saved to the Entry Object.
get_value_entry_list()Format the entry value safe for displaying on the entry list page.
get_filter_operators()Returns the filter operators for the current field.
post_convert_field()Performs actions after the field has been converted to an object.

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-website.php:32

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-website.php:45

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.

Parameters​

NameTypeDefaultDescription
$valuestring | arrayThe field value.
$entryarray[]The entry.
$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

Since:

  • 1.9
  • 2.9.29 (Changed the second parameter $currency (string) to $entry (array).)

Source: includes/fields/class-gf-field-website.php:132

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​

NameTypeDefaultDescription
$valuestringThe value to be saved.
$formarrayThe Form object currently being processed.
$input_namestringThe input name used when accessing the $_POST.
$entry_idintThe ID of the entry currently being processed.
$entryarrayThe entry currently being processed.
$repeater_indexstring''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-website.php:151

get_value_entry_list()​

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

Format the entry value safe for displaying on the entry list page.

Parameters​

NameTypeDefaultDescription
$valuestringThe field value.
$entryarrayThe Entry Object currently being processed.
$field_idstringThe field or input ID currently being processed.
$columnsarrayThe properties for the columns being displayed on the entry list page.
$formarrayThe Form Object currently being processed.

Returns​

  • string

Since: 3.1.2

Source: includes/fields/class-gf-field-website.php:178

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-website.php:191

post_convert_field()​

public function post_convert_field()

Performs actions after the field has been converted to an object.

Ensures the autocompleteAttribute property is set to 'url' if it is not already defined.

Since: 2.9.8

Source: includes/fields/class-gf-field-website.php:206