Nuxy
  • Nuxy
  • Installation
  • Adding Page Options
  • Adding Post Options
  • Adding Taxonomy Options
  • Adding Frontend Options
  • Getting Fields
  • Adding to admin bar
  • Tabs
    • General tab parameters
    • Add submenu
  • Field parameters
  • Registering field
  • Fields dependency
  • Fields group
  • Field types
    • General field parameters
    • 1. Text
    • 2. Number
    • 3. Textarea
    • 4. Checkbox
    • 5. Select
    • 6. Radio
    • 7. Color
    • 8. Image
    • 9. Editor
    • 10. Autocomplete
    • 11. Datepicker
    • 12. Datepicker range
    • 13. Time
    • 14. Sortable
    • 15. Sortable multi input
    • 16. Gallery
    • 17. Repeater
    • 18. Range slider
    • 19. Image Select
    • 20. Button group
    • 21. Icon picker
    • 22. Ace Editor
    • 23. Spacings
    • 24. Link color
    • 25. Multi checkbox
    • 26. Color Gradient
    • 27. Textarea with hints
    • 28. Typography
    • 29. Multiselect
    • 30. Notification Message
    • 31. Button List
    • 32. Group Title with Preview && Icon
  • Download Nuxy
Powered by GitBook
On this page
  1. Field types

29. Multiselect

Previous28. TypographyNext30. Notification Message

Last updated 4 months ago

Multiselect enables to selection of different options from the list to the corresponding setting:

There is also an availability to add new elements to the list right from the Multiselect:

'tab_title_selected_labels' => array(
   'type'    => 'multiselect',
   'label'   => esc_html__( 'Add features to the list', 'stm_vehicles_listing' ),
   'options' => $this->motors_get_features_list(),
   'new_tag_settings' => array(
      'add_label'     => esc_html__( 'Add New Feature', 'stm_vehicles_listing' ),
      'taxonomy_name' => 'stm_additional_features',
      'placeholder'   => 'Enter feature name',
      'add_btn'       => 'Add',
      'cancel_btn'    => 'Cancel',
   ),
),

#new_tag_settings - to insert the 'Add New' button

If you have some elements in one list of options, you have to add a unique selector and specify it in config under the key track_by

'multiselect_2' => array(
    'type' => 'multiselect',
    'label' => esc_html__( 'Multiselect', 'my-domain' ),
    'options' => array(
        array(
            'label' => 'My super title 1',
            'value' => '1'
        ),
        array(
            'label' => 'My super title 1',
            'value' => '2'
        ),
    ),
    'track_by' => 'value'
),