GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
GravityView_Plugin_Hooks_Gravity_Forms_Chained_Selects Class Reference
Inheritance diagram for GravityView_Plugin_Hooks_Gravity_Forms_Chained_Selects:
GravityView_Plugin_and_Theme_Hooks

Public Member Functions

 add_input_label ( $input_labels=array())
 
 add_input_type ( $input_type)
 Turns Chained Select inputs into the same choices as select/radio inputs. More...
 
 modify_searchable_fields ( $fields, $form_id)
 Don't show inputs of the Chained Select field, only the parent. More...
 
 modify_searchable_fields_allowlist ( $searchable_fields, $view, $with_full_field)
 Allow all inputs of a Chained Select field to be searched, even though only the parent is added to the widget. More...
 
 print_scripts ( $search_widget, $search_field)
 Enqueues and prints the required scripts for. More...
 
 print_styles ( $search_widget, $search_field)
 Outputs inline style for vertical display. More...
 
 set_input_type ( $input_type, $field_type, $field_id)
 Turns Chained Select inputs into the same choices as select/radio inputs. More...
 
- Public Member Functions inherited from GravityView_Plugin_and_Theme_Hooks
 __construct ()
 GravityView_Theme_Support constructor. More...
 
 _wp_loaded ()
 Fired when all themes and plugins have been loaded. More...
 
 merge_content_meta_keys ( $meta_keys=array(), $post=null, & $views=null)
 Merge plugin or theme meta keys that store shortcode data with existing keys to check. More...
 
 merge_meta_keys ( $meta_keys=array(), $post_id=0)
 Merge plugin or theme meta keys that store shortcode data with existing keys to check. More...
 
 merge_noconflict_scripts ( $handles)
 Merge plugin or theme scripts with existing no-conflict scripts. More...
 
 merge_noconflict_styles ( $handles)
 Merge plugin or theme styles with existing no-conflict styles. More...
 
 merge_post_type_support ( $supports=array(), $is_hierarchical=false)
 Merge plugin or theme post type support definitions with existing support values. More...
 

Static Public Member Functions

static get_field_values ( $gf_field)
 

Data Fields

const INPUT_TYPE = 'chainedselect'
 

Protected Member Functions

 add_hooks ()
 
- Protected Member Functions inherited from GravityView_Plugin_and_Theme_Hooks
 add_hooks ()
 Add filters for meta key and script/style handles, if defined. More...
 

Protected Attributes

 $constant_name = 'GF_CHAINEDSELECTS_VERSION'
 
- Protected Attributes inherited from GravityView_Plugin_and_Theme_Hooks
 $class_name = false
 string Optional. More...
 
 $constant_name = false
 string Optional. More...
 
 $content_meta_keys = array()
 Define the keys to be parsed by the gravityview/view_collection/from_post/meta_keys hook. More...
 
 $function_name = false
 string Optional. More...
 
 $meta_keys = array()
 Define the keys to be parsed by the gravityview/data/parse/meta_keys hook. More...
 
 $post_type_support = array()
 Define features in the admin editor used by the theme or plugin to be used when registering the GravityView post type. More...
 
 $script_handles = array()
 Define script handles used by the theme or plugin to be added to allowed no-conflict scripts. More...
 
 $style_handles = array()
 Define style handles used by the theme or plugin to be added to allowed no-conflict styles. More...
 

Detailed Description

Definition at line 13 of file class-gravityview-plugin-hooks-gravity-forms-chainedselects.php.

Member Function Documentation

◆ add_hooks()

add_hooks ( )
protected

◆ add_input_label()

add_input_label (   $input_labels = array())

◆ add_input_type()

add_input_type (   $input_type)

Turns Chained Select inputs into the same choices as select/radio inputs.

Parameters
array$input_typesAssociative array: key is field name, value is array of GravityView input types (note: use input_text for text).
Returns
array

Definition at line 228 of file class-gravityview-plugin-hooks-gravity-forms-chainedselects.php.

◆ get_field_values()

static get_field_values (   $gf_field)
static
Parameters
GF_Field$gf_field
Returns
array

Definition at line 178 of file class-gravityview-plugin-hooks-gravity-forms-chainedselects.php.

References $gf_field, and Utils\_REQUEST().

◆ modify_searchable_fields()

modify_searchable_fields (   $fields,
  $form_id 
)

Don't show inputs of the Chained Select field, only the parent.

See also
gravityview_get_form_fields() Used to fetch the fields
GravityView_Widget_Search::get_search_input_types See this method to modify the type of input types allowed for a field
Parameters
array$fieldsArray of searchable fields, as fetched by gravityview_get_form_fields()
int$form_id
Returns
array

Definition at line 210 of file class-gravityview-plugin-hooks-gravity-forms-chainedselects.php.

References $field.

◆ modify_searchable_fields_allowlist()

modify_searchable_fields_allowlist (   $searchable_fields,
  $view,
  $with_full_field 
)

Allow all inputs of a Chained Select field to be searched, even though only the parent is added to the widget.

Parameters
array$searchable_fieldsArray of GravityView-formatted fields or only the field ID? Example: [ '1.2', 'created_by' ]
\GV\View$viewObject of View being searched.
bool$with_full_fieldDoes $searchable_fields contain the full field array or just field ID? Default: false (just field ID)
Returns
array If chainedselect search type,

The first time through, it's just field IDs. We want the full details that include input type.

See also
GravityView_Widget_Search::filter_entries()

Definition at line 52 of file class-gravityview-plugin-hooks-gravity-forms-chainedselects.php.

References $field.

◆ print_scripts()

print_scripts (   $search_widget,
  $search_field 
)

Enqueues and prints the required scripts for.

Parameters
GravityView_Widget_Search$thisGravityView Widget instance
array$search_field
Returns
void

Definition at line 139 of file class-gravityview-plugin-hooks-gravity-forms-chainedselects.php.

References $search_field, and gravityview().

◆ print_styles()

print_styles (   $search_widget,
  $search_field 
)

Outputs inline style for vertical display.

Parameters
GravityView_Widget_Search$thisGravityView Widget instance
array{key:string,label:string,value:string,type:string,choices:array}$search_field
Returns
void

Prevent Chained Select Search Bar input fields from outputting styles.

Since
TODO
Parameters
bool$should_print_stylesTrue: Output styles; False: don't.
GravityView_Widget_Search$thisGravityView Widget instance.
array{key:string,label:string,value:string,type:string,choices:array}$search_field

Definition at line 88 of file class-gravityview-plugin-hooks-gravity-forms-chainedselects.php.

References $search_field.

◆ set_input_type()

set_input_type (   $input_type,
  $field_type,
  $field_id 
)

Turns Chained Select inputs into the same choices as select/radio inputs.

Parameters
array$input_typesAssociative array: key is field name, value is array of GravityView input types (note: use input_text for text).
Returns
string

Definition at line 242 of file class-gravityview-plugin-hooks-gravity-forms-chainedselects.php.

Field Documentation

◆ $constant_name

$constant_name = 'GF_CHAINEDSELECTS_VERSION'
protected

◆ INPUT_TYPE

const INPUT_TYPE = 'chainedselect'

The documentation for this class was generated from the following file: