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

14. Sortable

Add list with available options with sort functionality

Previous13. TimeNext15. Sortable multi input

Last updated 11 months ago

Example adding

'sorter_field' => array(
	'type' => 'sorter',
	'label' => esc_html__( 'Hello there', 'my-domain' ),
	'options' => array(
		array(
			'id' => 'list_1',
			'name' => esc_html__( 'List 1', 'my-domain' ),
			'options' => array(
				array(
					'id' => 'key_2',
					'label' => esc_html__( 'Key 2', 'my-domain' ),
					'icon' => 'fa fa-clock',
					'class' => 'disable'
 				),
				array(
					'id' => 'key_9',
					'label' => esc_html__( 'Key 9', 'my-domain' )
				),
			)
		),
		array(
			'id' => 'list_2',
			'name' => esc_html__( 'List 2', 'my-domain' ),
			'options' => array(
				array(
					'id' => 'key_4',
					'label' => esc_html__( 'Key 4', 'my-domain' )
				),
				array(
					'id' => 'key_3',
					'label' => esc_html__( 'Key 3', 'my-domain' )
				),
				array(
					'id' => 'key_7',
					'label' => esc_html__( 'Key 7', 'my-domain' )
				),
				array(
					'id' => 'key_8',
					'label' => esc_html__( 'Key 8', 'my-domain' )
				),
			)
		),
		array(
			'id' => 'list_3',
			'name' => esc_html__( 'List 3', 'my-domain' ),
			'options' => array(
				array(
					'id' => 'key_5',
					'label' => esc_html__( 'Key 5', 'my-domain' )
				),
				array(
					'id' => 'key_6',
					'label' => esc_html__( 'Key 6', 'my-domain' )
				),
			)
		),
	)
),
'sorter_field' => array(
	'type' => 'sorter',
	'label' => esc_html__( 'Hello there', 'my-domain' ),
	'options' => array(
		array(
			'id' => 'list_1',
			'name' => esc_html__( 'List 1', 'my-domain' ),
			'options' => array(
				array(
					'id' => 'key_2',
					'label' => esc_html__( 'Key 2', 'my-domain' ),
					'icon' => 'fa fa-clock',
					'class' => 'disable'
' 				),
				array(
					'id' => 'key_9',
					'label' => esc_html__( 'Key 9', 'my-domain' )
				),
			)
		)
	)
),

параметр class disable - отключает drag&drop, sortable

icon - добавляет иконку

Sorter view