GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
gquiz_percent.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Display Gravity Forms Quiz value Pass/Fail
4  *
5  * @package GravityView
6  * @subpackage GravityView/templates/fields
7  */
8 
9 $field = GravityView_View::getInstance()->getCurrentField();
10 
11 // If there's no grade, don't continue
12 if( gv_empty( $field['value'], false, false ) ) {
13  return;
14 }
15 
16 /**
17  * @filter `gravityview/field/quiz_percent/format` Modify the format of the display of Quiz Score (Percent) field.
18  * @see http://php.net/manual/en/function.sprintf.php For formatting guide
19  * @param string $format Format passed to printf() function. Default `%d%%`, which prints as "{number}%". Notice the double `%%`, this prints a literal '%' character.
20  */
21 $format = apply_filters('gravityview/field/quiz_percent/format', '%d%%');
22 
23 printf( $format, $field['value'] );
static getInstance( $passed_post=NULL)
if(gv_empty( $field['value'], false, false)) $format
$field
gv_empty( $value, $zero_is_empty=true, $allow_string_booleans=true)
Is the value empty?