GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
product.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Display the product field type
4  *
5  * @package GravityView
6  * @subpackage GravityView/templates/fields
7  */
8 
10 
11 extract( $gravityview_view->getCurrentField() );
12 
13 /**
14  * See if there are any values in the product array GF provides. (product name, quantity, price)
15  *
16  * If not, Gravity Forms displays a useless string (", Qty: , Price:") instead of an empty value. This prevents
17  * the "Hide empty fields" setting from working.
18  *
19  * @since 1.12
20  */
21 $value = is_array( $value ) ? array_filter( $value, 'gravityview_is_not_empty_string' ) : $value;
22 
23 // If so, then we have something worth showing
24 if ( !empty( $value ) ) {
25  echo gravityview_get_field_value( $entry, $field_id, $display_value );
26 }
gravityview_get_field_value($entry, $field_id, $display_value)
Handle getting values for complex Gravity Forms fields.
Definition: class-api.php:859
$gravityview_view
Definition: product.php:9
$field_id
Definition: time.php:17
static getInstance($passed_post=NULL)
$entry
Definition: notes.php:27
$value
See if there are any values in the product array GF provides.
Definition: product.php:21