GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
signature.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Display the signature field type
4  *
5  * @package GravityView
6  * @subpackage GravityView/templates/fields
7  */
8 
10 
11 extract( $gravityview_view->getCurrentField() );
12 
13 // If empty, there's no signature to show
14 if( empty( $value ) ) { return; }
15 
16 if( !class_exists( 'GFSignature' ) ) {
17  do_action('gravityview_log_error', '[fields/signature.php] GFSignature not loaded.');
18  return;
19 }
20 
21 $image_atts = array(
22  'src' => GFSignature::get_instance()->get_signature_url( $value ),
23  'width' => ( rgblank(rgget("boxWidth", $field)) ? '300' : rgar($field, "boxWidth") ), // Taken from signature addon signature_input() method
24  'height' => '180', // Always 180
25  'validate_src' => false, // Don't check if there's a valid image extension
26  'alt' => '',
27 );
28 
29 echo new GravityView_Image( $image_atts );
Generic class for generating image tag.
if(empty($value)) if(!class_exists( 'GFSignature')) $image_atts
Definition: signature.php:21
$gravityview_view
Definition: signature.php:9
static getInstance($passed_post=NULL)
$field
Definition: gquiz_grade.php:11