![]() |
GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Add custom options for address fields. More...
Public Member Functions | |
| __construct () | |
| field_options ( $field_options, $template_id, $field_id, $context, $input_type, $form_id) | |
| input_types ( $input_types) | |
| Add the input types available for each custom search field type. More... | |
| search_bar_input_type ( $input_type, $field_type, $field_id) | |
| Converts the custom input type (address) into the selected type. More... | |
| search_field_filter ( $search_fields, $widget, $widget_args) | |
| Dynamically add choices to the address field dropdowns, if any. More... | |
Public Member Functions inherited from GravityView_Field | |
| __construct () | |
| GravityView_Field constructor. More... | |
| _filter_gform_custom_merge_tags ( $custom_merge_tags=array(), $form_id=0, $fields=array(), $element_id='') | |
| Add custom merge tags to merge tag options. More... | |
| _filter_gform_replace_merge_tags ( $text, $form=array(), $entry=array(), $url_encode=false, $esc_html=false) | |
| Match the merge tag in replacement text for the field. More... | |
| _filter_sortable_fields ( $not_sortable) | |
| Use field settings to modify whether a field is sortable. More... | |
| add_entry_meta ( $entry_meta) | |
| Add the custom entry meta key to make it searchable and sortable. More... | |
| add_field_support ( $key, &$field_options) | |
| add_sortable_field ( $fields) | |
| Add the field to the Filter & Sort available fields. More... | |
| as_array () | |
| Returns the field as an array to be used in field pickers. More... | |
| field_options ( $field_options, $template_id, $field_id, $context, $input_type, $form_id) | |
| Tap in here to modify field options. More... | |
| replace_merge_tag ( $matches=array(), $text='', $form=array(), $entry=array(), $url_encode=false, $esc_html=false) | |
| Run GravityView filters when using GFCommon::replace_variables() More... | |
| set_default_search_label ( $label='', $gf_field=null, $field=array()) | |
| Allow setting a default search label for search fields based on the field type. More... | |
Data Fields | |
| $_gf_field_class_name = 'GF_Field_Address' | |
| $group = 'advanced' | |
| $icon = 'dashicons-location-alt' | |
| $is_numeric = false | |
| $is_searchable = true | |
| $name = 'address' | |
| $search_operators = array( 'is', 'isnot', 'contains' ) | |
Data Fields inherited from GravityView_Field | |
| $_gf_field_class_name | |
| $contexts = array( 'single', 'multiple', 'edit', 'export' ) | |
| $default_search_label | |
| $description | |
| $entry_meta_is_default_column = false | |
| $entry_meta_key = null | |
| $entry_meta_update_callback = null | |
| $group | |
standard, advanced, post, pricing, meta, gravityview, or add-ons More... | |
| $icon = 'dashicons-admin-generic' | |
| $is_numeric | |
| boolean Is field content number-based? More... | |
| $is_searchable = true | |
| $is_sortable = true | |
| boolean Can the field be sorted in search? More... | |
| $label | |
| $name | |
| $search_operators | |
Private Member Functions | |
| add_hooks () | |
| Add filters for this field type. More... | |
| get_choices_country ( $address_field) | |
| Get array of countries to use for the search choices. More... | |
| get_choices_state ( $address_field, $form) | |
| Get array of states to use for the search choices. More... | |
Static Private Member Functions | |
| static | get_input_type_from_input_id ( $input_id) |
| Get a name for the input based on the input ID. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from GravityView_Field | |
| custom_merge_tags ( $form=array(), $fields=array()) | |
| Add custom Merge Tags to Merge Tag options, if custom Merge Tags exist. More... | |
| is_choice_value_enabled () | |
Check whether the enableChoiceValue flag is set for a GF field. More... | |
Protected Attributes inherited from GravityView_Field | |
| $_custom_merge_tag = false | |
| $_field_id = '' | |
| $_field_options = array() | |
Add custom options for address fields.
Definition at line 11 of file class-gravityview-field-address.php.
| __construct | ( | ) |
Definition at line 37 of file class-gravityview-field-address.php.
References add_hooks().
|
private |
Add filters for this field type.
Definition at line 52 of file class-gravityview-field-address.php.
Referenced by __construct().
| field_options | ( | $field_options, | |
| $template_id, | |||
| $field_id, | |||
| $context, | |||
| $input_type, | |||
| $form_id | |||
| ) |
Definition at line 284 of file class-gravityview-field-address.php.
References $field_id.
|
private |
Get array of countries to use for the search choices.
| GF_Field_Address | $address_field |
value and text keys as the name of the country Definition at line 118 of file class-gravityview-field-address.php.
|
private |
Get array of states to use for the search choices.
GF_Field_Address::get_us_states() GF_Field_Address::get_us_state_code() GF_Field_Address::get_canadian_provinces()
| GF_Field_Address | $address_field | |
| array | $form |
value and text keys as the name of the country Definition at line 148 of file class-gravityview-field-address.php.
References GV\$form.
|
staticprivate |
Get a name for the input based on the input ID.
| int | $input_id | ID of the specific input for the address field |
Definition at line 256 of file class-gravityview-field-address.php.
References $input_id.
| input_types | ( | $input_types | ) |
Add the input types available for each custom search field type.
| array | $input_types | Array of input types as the keys (select, radio, multiselect, input_text) with a string or array of supported inputs as values |
Definition at line 203 of file class-gravityview-field-address.php.
References Utils\get().
| search_bar_input_type | ( | $input_type, | |
| $field_type, | |||
| $field_id | |||
| ) |
Converts the custom input type (address) into the selected type.
| string | $input_type | Assign an input type according to the form field type. Defaults: boolean, multi, select, date, text |
| string | $field_type | Gravity Forms field type (also the name parameter of GravityView_Field classes) |
| string | int | float | $field_id | ID of the field being processed |
Definition at line 230 of file class-gravityview-field-address.php.
References $field_id, $input_id, and gravityview_get_input_id_from_id().
| search_field_filter | ( | $search_fields, | |
| $widget, | |||
| $widget_args | |||
| ) |
Dynamically add choices to the address field dropdowns, if any.
| array | $search_fields | Array of search filters with key, label, value, type keys |
| GravityView_Widget_Search | $widget | Current widget object |
| array | $widget_args | Args passed to this method. { |
address, and there are choices to add, adds them and changes the input type. Otherwise, sets the input to text. GF_Field_Address $address_field
GravityView_Field_Address::get_choices_country() GravityView_Field_Address::get_choices_state()
Definition at line 69 of file class-gravityview-field-address.php.
References $field_id, GV\$form, $input_id, $search_field, Utils\get(), GravityView_View\getInstance(), and gravityview_get_input_id_from_id().
| $_gf_field_class_name = 'GF_Field_Address' |
Definition at line 35 of file class-gravityview-field-address.php.
| $group = 'advanced' |
Definition at line 17 of file class-gravityview-field-address.php.
| $icon = 'dashicons-location-alt' |
Definition at line 32 of file class-gravityview-field-address.php.
| $is_numeric = false |
Definition at line 20 of file class-gravityview-field-address.php.
| $is_searchable = true |
Definition at line 23 of file class-gravityview-field-address.php.
| $name = 'address' |
Definition at line 14 of file class-gravityview-field-address.php.
| $search_operators = array( 'is', 'isnot', 'contains' ) |
Definition at line 26 of file class-gravityview-field-address.php.