GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
field-csv.php
Go to the documentation of this file.
1 <?php
2 /**
3  * The default field output template for CSVs.
4  *
5  * @global \GV\Template_Context $gravityview
6  * @since 2.0
7  */
8 
9 if ( ! isset( $gravityview ) || empty( $gravityview->template ) ) {
10  gravityview()->log->error( '{file} template loaded without context', array( 'file' => __FILE__ ) );
11  return;
12 }
13 
14 $field_id = $gravityview->field->ID;
15 $display_value = $gravityview->display_value;
16 $value = $gravityview->value;
17 $entry = $gravityview->entry->as_entry();
18 
19 /**
20  * Fields that will output as raw data in CSV mode.
21  */
22 $raw_types = array(
23  'email',
24  'textarea',
25  'website',
26 );
27 
28 /**
29  * @filter `gravityview/template/csv/field/raw` Filters field types to output by value instead of display_value.
30  * @param[in, out] bool Raw or not. By default outputs raw for $raw_types.
31  * @param \GV\Template_Context The context.
32  * @since develop
33  */
34 $raw = apply_filters( 'gravityview/template/csv/field/raw', in_array( $gravityview->field->type, $raw_types, true ), $gravityview );
35 
gravityview_get_field_value( $entry, $field_id, $display_value)
Handle getting values for complex Gravity Forms fields.
Definition: class-api.php:1034
$raw_types
Fields that will output as raw data in CSV mode.
Definition: field-csv.php:22
$display_value
Definition: field-csv.php:15
$raw
Definition: field-csv.php:34
if(! isset( $gravityview)||empty( $gravityview->template)) $field_id
The default field output template for CSVs.
Definition: field-csv.php:14
$value
Definition: field-csv.php:16
$entry
Definition: field-csv.php:17
gravityview()
The main GravityView wrapper function.