Skip to content

estin1985/CMB2-Suggest-Field

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

CMB Field Type: Suggest

Description

Suggest field type for CMB2.

This plugin creates a text input that uses wordpress' inbuilt suggest system:

  1. The suggest field renders a normal text input field. However, it adds autocomplete suggestions based on the 'options' key.

Installation

You can install this field type as you would a WordPress plugin:

  1. Download the plugin
  2. Place the plugin folder in your /wp-content/plugins/ directory
  3. Activate the plugin in the Plugin dashboard

Usage

suggest - Text input with auto suggestions. Example:

array(
	'name'    => 'Cooking time',
	'id'      => $prefix . 'cooking_time',
	'desc'    => 'Cooking time',
	'type'    => 'suggest',
	'options' => array(
		'5'  => '5 minutes',
		'10' => '10 minutes',
		'30' => 'Half an hour',
		'60' => '1 hour',
	),
),

About

An Autocomplete Field Type for CMB2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published