Class Fieldmanager_Autocomplete
Text field that responds to user input with autocomplete suggestions (optionally via an ajax request).
This must include a Fieldmanager_Datasource
, which the autocomplete
uses to search against.
- Fieldmanager_Field
- Fieldmanager_Autocomplete
Methods summary
public
|
|
public
|
|
public
|
|
public
string
|
|
public
array
|
#
presave_alter_values( array $values, array $current_values = array() )
Trigger datasource's presave_alter() event to allow it to handle reciprocal values |
public
array
|
Methods inherited from Fieldmanager_Field
_invalid_definition()
,
_unauthorized_access()
,
activate_submenu_page()
,
add_another()
,
add_meta_box()
,
add_page_form()
,
add_quickedit_box()
,
add_submenu_page()
,
add_term_meta_box()
,
add_user_form()
,
element_markup()
,
escape()
,
get_collapse_handle()
,
get_element_attributes()
,
get_element_id()
,
get_element_key()
,
get_element_label()
,
get_extra_element_classes()
,
get_form_name()
,
get_form_tree()
,
get_remove_handle()
,
get_sort_handle()
,
is_group()
,
is_repeatable()
,
presave_all()
,
set_options()
,
single_element_markup()
,
wrap_with_multi_tools()
Magic methods summary
Properties summary
public
boolean
|
$exact_match |
#
Require an exact match; e.g. prevent the user from entering free text |
public
boolean
|
$show_edit_link | |
public
string
|
$reciprocal |
#
Key for reciprocal relationship; if defined will add an entry to postmeta on the mirrored post. |
public
callable
|
$query_callback |
#
What function to call to match posts. Initialized to Null here because it will be written in __construct to an internal function that calls get_posts, so only overwrite it if you do /not/ want to use get_posts. The function signature should be query_callback( $match, $args ); |
public
string
|
$custom_args_js_event |
#
Javascript trigger to handle adding custom args |
public
boolean
|
$save_empty |
#
Override save_empty for this element type |
Properties inherited from Fieldmanager_Field
$add_more_label
,
$add_more_position
,
$attributes
,
$data_id
,
$data_type
,
$datasource
,
$debug
,
$default_value
,
$description
,
$description_after_element
,
$display_if
,
$escape
,
$extra_elements
,
$field_class
,
$index
,
$index_filter
,
$inline_label
,
$input_type
,
$is_attachment
,
$label
,
$label_after_element
,
$label_element
,
$limit
,
$meta_boxes_to_remove
,
$minimum_count
,
$name
,
$one_label_per_item
,
$remove_default_meta_boxes
,
$required
,
$sanitize
,
$serialize_data
,
$skip_save
,
$sortable
,
$template
,
$validate
,
$validation_messages
,
$validation_rules