Field :: generic

The generic field type can be used to create fields that do not influence your search's WP_Query object in any way.  It may be useful for controlling other elements of the user experience such as customizing the front-end appearance of your search pages.

Parameters

id
(string) (required)
Default: None
label
(string)
Default: None
format
(string) 'select', 'multi-select', 'checkbox', 'radio', 'text', 'hidden', 'number', 'color', 'url', 'email', 'tel', 'date', 'datetime', 'time', 'week'
Default: None
default
(string)
Default: None
values
(array)
Default: None

Example

Generic field for selecting ‘color’

$args['fields'][] = array(
                          'type' => 'generic',
                          'id' => 'color',
                          'format' => 'radio',
                          'values' => array('red' => 'Red', 'blue' => 'Blue')
                    );