Skip to main content

get_selection_value()

public static function get_selection_value( $value, $field=null )

Returns the value of the selected item. For pricing fields, returns the selected value without the price.

Since: 2.10.5 (Added the $field parameter)

Source: common.php:3441

Parameters

NameTypeDefaultDescription
$valuearray | stringThe raw selected field value.
$fieldGF_FieldnullThe selected field object.

Returns

  • string — Returns the selected value.