GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
includes
widgets
search-widget
templates
search-field-date_range.php
Go to the documentation of this file.
1
<?php
2
/**
3
* Display the search by entry date input boxes
4
*
5
* @file class-search-widget.php See for usage
6
*/
7
8
$gravityview_view
=
GravityView_View::getInstance
();
9
$view_id
=
$gravityview_view
->getViewId();
10
$value
=
$gravityview_view
->search_field[
'value'
];
11
$label
=
$gravityview_view
->search_field[
'label'
];
12
$name
=
$gravityview_view
->search_field[
'name'
];
13
?>
14
15
<div
class
=
"gv-search-box gv-search-date gv-search-date-range"
>
16
<?php
if
( !
gv_empty
(
$label
,
false
,
false
) ) { ?>
17
<label
for
=
"search-box-<?php echo esc_attr( $name ).'-start'; ?>"
><?php echo esc_html(
$label
); ?></label>
18
<?php } ?>
19
<p>
20
<input name=
"<?php echo esc_attr( $name ).'[start]'; ?>"
id
=
"search-box-<?php echo esc_attr( $name ).'-start'; ?>"
type=
"text"
class
=
"<?php echo esc_html( $gravityview_view->datepicker_class ); ?>"
placeholder=
"<?php esc_attr_e('Start date', 'gk-gravityview' ); ?>"
value=
"<?php echo esc_attr( $value['start'] ); ?>"
>
21
<input name=
"<?php echo esc_attr( $name ).'[end]'; ?>"
id
=
"search-box-<?php echo esc_attr( $name ).'-end'; ?>"
type=
"text"
class
=
"<?php echo esc_html( $gravityview_view->datepicker_class ); ?>"
placeholder=
"<?php esc_attr_e('End date', 'gk-gravityview' ); ?>"
value=
"<?php echo esc_attr( $value['end'] ); ?>"
>
22
</p>
23
</div>
GravityView_View\getInstance
static getInstance( $passed_post=NULL)
Definition:
class-template.php:195
$label
$label
Definition:
search-field-date_range.php:11
$value
$value
Definition:
search-field-date_range.php:10
$gravityview_view
$gravityview_view
Definition:
search-field-date_range.php:8
$name
$name
Definition:
search-field-date_range.php:12
$view_id
$view_id
Definition:
search-field-date_range.php:9
gv_empty
gv_empty( $value, $zero_is_empty=true, $allow_string_booleans=true)
Is the value empty?
Definition:
helper-functions.php:412