Multiselect

<?php $tea_content = array( array( 'type' => 'multiselect', 'title' => 'Select the Minions that you may know', 'id' => 'my_multiselect_field_id', 'default' => 'henry', 'description' => 'Pay attention to this question ;)', 'options' => array( 'henry' => 'Henry', 'jacques' => 'Jacques', 'kevin' => 'Kevin', 'tom' => 'Tom', ), ), );
1233 1234

Retrieve data

Using the _get_option('my_multiselect_field_id') method, you'll get (with a json_encode() display):

["henry", "jacques", "kevin", "tom"]

Did this page help you?