Column Type Select
-
function pw_bulk_edit_custom_columns( $columns ) {
$columns[] = array(
‘name’ => ‘Fix or Percent’,
‘type’ => ‘select’,
‘table’ => ‘meta’,
‘field’ => ‘_pixel_cost_of_goods_cost_type’,
‘visibility’ => ‘both’,
‘readonly’ => false,
‘sortable’ => ‘true’,
‘options_value_fix’ => ‘Fix’,
‘options__value_percent’ => ‘Percent’,
);Using the above code I see the field “Fix or Percent” in WP Bulk Edit.
All listings showing N/A.
Click tab to edit.
Title shows “Select Fix or Percent”.
Click Dropdown box is empty and shows the message No Results Found.If I change Type to shortselect or text I see the fields correctly, but they are a text field showing the current setting.
This can be edited and updated correctly.So I need help with the options section of the above code, assuming that the
type => select is a valid option.Regards Colin
- The topic ‘Column Type Select’ is closed to new replies.