GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
templates
deprecated
fields
number.php
Go to the documentation of this file.
1
<?php
2
/**
3
* Display the number field type
4
*
5
* @since 1.13
6
*
7
* @package GravityView
8
* @subpackage GravityView/templates/fields
9
*/
10
11
$gravityview_view
=
GravityView_View::getInstance
();
12
13
/**
14
* @var double|int|string $value
15
* @var double|int|string $display_value
16
*/
17
extract(
$gravityview_view
->getCurrentField() );
18
19
if
(
$value
!==
''
&& !empty(
$field_settings
[
'number_format'
] ) ) {
20
$decimals = ( isset(
$field_settings
[
'decimals'
] ) &&
$field_settings
[
'decimals'
] !==
''
) ?
$field_settings
[
'decimals'
] :
''
;
21
echo
gravityview_number_format
(
$value
, $decimals );
22
}
else
{
23
echo
$display_value
;
24
}
GravityView_View\getInstance
static getInstance( $passed_post=NULL)
Definition:
class-template.php:195
$display_value
$display_value
Definition:
field-address-csv.php:17
$field_settings
$field_settings['content']
Definition:
custom.php:27
$gravityview_view
$gravityview_view
Definition:
number.php:11
$value
$value
Definition:
search-field-date_range.php:10
gravityview_number_format
gravityview_number_format( $number, $decimals='', $separator=true)
Intelligently format a number.
Definition:
helper-functions.php:241