Skip to main content

GF_Field_Price

Source: includes/fields/class-gf-field-price.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_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.

Method Reference​

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.8

Source: includes/fields/class-gf-field-price.php:30

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-price.php:104