14 gravityview()->log->debug(
'search-field-select.php - No choices for field' );
19 gravityview()->log->debug(
'search-field-select.php - Array values passed; using first value.' );
35 <div
class=
"gv-search-box gv-search-field-select">
37 <label
for=
"search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html(
$search_field[
'label'] ); ?></label>
40 <select name=
"<?php echo esc_attr( $search_field['name'] ); ?>" id=
"search-box-<?php echo esc_attr( $search_field['name'] ); ?>">
44 <?php
if ( is_array( $choice[
'value'] ) ) { ?>
45 <optgroup label=
"<?php echo esc_attr( $choice['text'] ); ?>">
46 <?php
foreach ( $choice[
'value'] as $subchoice ): ?>
47 <option value=
"<?php echo esc_attr( $subchoice['value'] ); ?>"><?php echo esc_html( $subchoice[
'text'] ); ?></option>
51 <option value=
"<?php echo esc_attr( $choice['value'] ); ?>" <?php
gv_selected( esc_attr( $choice[
'value'] ), esc_attr(
$search_field[
'value'] ),
true ); ?>><?php echo esc_html( $choice[
'text'] ); ?></option>
static getInstance( $passed_post=NULL)
if(empty( $search_field['choices'])) if(is_array( $search_field['value'])) $gf_field
static get( $array, $key, $default=null)
Grab a value from an array or an object or default.
gravityview()
The main GravityView wrapper function.
gv_empty( $value, $zero_is_empty=true, $allow_string_booleans=true)
Is the value empty?
gv_selected( $value, $current, $echo=true, $type='selected')
Similar to the WordPress selected(), checked(), and disabled() functions, except it allows arrays to ...