inputs

Type: array
Possible values: Array of arrays consisting of input arguments

Introduced in version 1.4, the inputs argument can be used to specify multiple form inputs which control a single field. This parameter is currently only available for use with meta_key and taxononomy fields.

How to use

Example: Search over a range of “price” values (a meta key) using two number inputs, with default starting values of 0 and 50.

        $args = array(
            'type' => 'meta_key',
            'meta_key' => 'price',
            'compare' => 'BETWEEN',
            'data_type' => 'NUMERIC',
            'inputs' => array(
                array(
                    'format' => 'number',
                    'value' => '0',
                ),
                array(
                    'format' => 'number'
                    'value' => '50'
                )
            )
        );

Example: Search over the ‘category’ taxonomy using two multi-select fields.

        $args['fields'][] = array(
            'type' => 'taxonomy',
            'taxonomy' => 'category',
            'relation' => 'AND',
            'inputs' => array(
                array(
                    'label' => 'Match all:',
                    'format' => 'multi-select',
                    'operator' => 'AND'
                ),
                array(
                    'label' => 'Match any:',
                    'format' => 'multi-select',
                    'operator' => 'IN'
                )
            )

        );

The ‘inputs’ parameter must be an array of arrays, with each array representing a set of input parameters. Most parameters that can be used for fields can also be used for individual inputs. The only parameter you must specify for an input is the format.