Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Hazel Bird

Create column with dropdown / data validation

Apologies if I’m asking something obvious – I can’t find this explained anywhere. How do I define a set of options with a dropdown in a custom field? I want to be able to choose from a predefined set of options (e.g. ‘Started’, ‘In progress’, ‘Final review’) rather than having to type the text in every time.

Thank you.

2 years, 2 months ago
Stefan van den Dungen Gronovius

Since our plugin does not know anything about the context where your custom field lives. It does however work if you use a custom field manager like ACF, Types, JetEngine, or MetaBox. In that case, if you have a custom field that acts as a drop-down field, it will automatically give you the option to select the values for Editing and Search in a dropdown. But if you defined the custom fields yourself, the only way to support that in our plugin is to write some custom code.

You can have a look at the documentation.
search for the method acp_editing_view_settings_change_select_options_example

This is perfectly fine if you only need it for inline editing. Otherwise, I would recommend considering using one of the plugins mentioned above to manage your custom fields.

2 years, 2 months ago
Hazel Bird

Thank you. I’m trying to use the ACF method. I’ve created the fields in ACF and added some data via the Edit Post screen, but I can’t work out how to make Admin Columns display my ACF fields properly. I’m using the documentation here:

I have activated the ACF add-on. However, ‘Advanced Custom Fields’ doesn’t appear as an option when I go to Admin Columns > Add Column > Type.

If I leave Type as ‘Custom Field’ and then scroll further down in the Field box in Admin Columns, I see the names of my ACF fields prefaced by underscores (e.g. ‘_rating’). However, if I select this in the Field box, my WP dashboard displays a code (e.g. ‘field_623b39b1fa813’) in the relevant column. It doesn’t display the actual values I’ve entered via Edit Post.

Also, no dropdown is appearing in my WP dashboard when I try to edit the values.

What am I missing here? Thanks.

2 years, 2 months ago

You must be logged in to reply to this topic.