GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
templates
deprecated
fields
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
9
$gravityview_view
=
GravityView_View::getInstance
();
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'
: \
GV
\Utils::get(
$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
);
GravityView_Image
Generic class for generating image tag.
Definition:
class-gravityview-image.php:5
GravityView_View\getInstance
static getInstance( $passed_post=NULL)
Definition:
class-template.php:195
GV
$image_atts
if(empty( $value)) if(!class_exists( 'GFSignature')) $image_atts
Definition:
signature.php:21
$field
$field
Definition:
search-field-chainedselect.php:29
$value
$value
Definition:
search-field-date_range.php:10
$gravityview_view
$gravityview_view
Definition:
signature.php:9