Class Fieldmanager_Select
Select dropdown or multi-select field.
This class extends Fieldmanager_Options
, which allows you to define
options (values) via an array or via a dynamic Fieldmanager_Datasource
,
like Fieldmanager_Datasource_Post
, Fieldmanager_Datasource_Term
,
or Fieldmanager_Datasource_User
.
- Fieldmanager_Field
- Fieldmanager_Options
- Fieldmanager_Select
Methods summary
public
|
#
__construct( string $label = '', array $options = array() )
Override constructor to add chosen.js maybe |
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
Methods inherited from Fieldmanager_Options
add_options()
,
form_data_elements()
,
option_selected()
,
preload_alter_values()
,
presave()
,
presave_all()
,
presave_alter_values()
,
sanitize()
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()
,
set_options()
,
single_element_markup()
,
wrap_with_multi_tools()
Magic methods summary
Properties summary
public
string
|
$field_class |
#
Override $field_class |
public
boolean
|
$type_ahead |
#
Should we support type-ahead? i.e. use chosen.js or not |
public
boolean
|
$first_empty |
#
Send an empty element first |
public
boolean
|
$multiple |
#
Tell FM to save multiple values |
Properties inherited from Fieldmanager_Options
$data
,
$first_element
,
$grouped
,
$options
,
$options_template
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
,
$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
,
$save_empty
,
$serialize_data
,
$skip_save
,
$sortable
,
$template
,
$validate
,
$validation_messages
,
$validation_rules