GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
includes
admin
field-types
type_text.php
Go to the documentation of this file.
1
<?php
2
/**
3
* text input type
4
*/
5
class
GravityView_FieldType_text
extends
GravityView_FieldType
{
6
7
function
render_option
() {
8
?>
9
<label
for
=
"<?php echo $this->get_field_id(); ?>"
class
=
"<?php echo $this->get_label_class(); ?>"
><?php
10
11
echo
'<span class="gv-label">'
.$this->get_field_label().
'</span>'
;
12
echo $this->
get_tooltip
() . $this->
get_field_desc
();
13
?><div>
14
<?php $this->
render_input
(); ?>
15
</div>
16
</label>
17
<?php
18
}
19
20
function
render_input
( $override_input = null ) {
21
22
if
( isset( $override_input ) ) {
23
echo $override_input;
24
return
;
25
}
26
27
$class
=
''
;
28
29
$show_mt = $this->
show_merge_tags
();
30
31
if
( $show_mt && $this->field[
'merge_tags'
] !==
false
|| $this->field[
'merge_tags'
] ===
'force'
) {
32
$class
=
'gv-merge-tag-support mt-position-right mt-hide_all_fields '
;
33
}
34
$class
.=
\GV\Utils::get
( $this->field,
'class'
,
'widefat'
);
35
$placeholder
=
\GV\Utils::get
( $this->field,
'placeholder'
);
36
?>
37
<input name=
"<?php echo esc_attr( $this->name ); ?>"
placeholder=
"<?php echo esc_attr( $placeholder ); ?>"
id
=
"<?php echo $this->get_field_id(); ?>"
type=
"text"
value=
"<?php echo esc_attr( $this->value ); ?>"
class
=
"<?php echo esc_attr( $class ); ?>"
>
38
<?php
39
}
40
41
}
42
43
44
GravityView_FieldType\show_merge_tags
show_merge_tags()
Verify if field should have merge tags.
Definition:
class.field.type.php:218
GravityView_FieldType\get_field_desc
get_field_desc()
Retrieve field description.
Definition:
class.field.type.php:209
$class
$class
Definition:
entry_approval.php:24
GravityView_FieldType_text
text input type
Definition:
type_text.php:5
$placeholder
$placeholder
Definition:
search-field-multiselect.php:19
GravityView_FieldType
Modify option field type by extending this class.
Definition:
class.field.type.php:6
GravityView_FieldType_text\render_option
render_option()
Definition:
type_text.php:7
GV\Utils\get
static get( $array, $key, $default=null)
Grab a value from an array or an object or default.
Definition:
class-gv-utils.php:72
GravityView_FieldType\get_tooltip
get_tooltip()
Definition:
class.field.type.php:81
GravityView_FieldType_text\render_input
render_input( $override_input=null)
Definition:
type_text.php:20