This plugin creates a text input that uses wordpress' inbuilt suggest system:
- The
suggest
field renders a normal text input field. However, it adds autocomplete suggestions based on the 'options' key.
You can install this field type as you would a WordPress plugin:
- Download the plugin
- Place the plugin folder in your
/wp-content/plugins/
directory - Activate the plugin in the Plugin dashboard
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',
),
),