I tested your code and this ended up working for me:
case 'multiselect':
echo '<select name="'.$field['id'].'" id="'.$field['id'].'">';
foreach ($field['options'] as $option) {
echo '<option', $meta == $option['value'] ? ' selected="selected"' : '', ' value="'.$option['value'].'">'.$option['label'].'</option>'; }
echo '</select><br /><span class="description">'.$field['desc'].'</span>';
break;
For the Field Array
I just added another option with a blank value and a label of “Select”.
Also, I removed an extra “;” on the second to last line.
$prefix = 'sysout_';
$outage_meta_fields = array(
array(
'label' => 'Buildings Affected',
'desc' => 'Select the buildings affected',
'id' => $prefix.'buildings',
'type' => 'multiselect',
'options' => array(
'Select' => array(
'label' => 'Select',
'value' => ''
),
'building1' => array(
'label' => 'Building 1',
'value' => 'building1'
),
'building2' => array(
'label' => 'Building 2',
'value' => 'building2' //This continues for a while
)
)
)
);