Hi Toolset Support Team
When adding a select field I can manually add the options. But how could I use values from a CPT?
I searched through the support forum and in the documentation, but didn't come across any solutions yet.
Example:
I have a CPT to list countries and would like this country list to be used to populate a select field?
Is this possible?
Hi, if you're talking about a select field in Forms, then you can use a generic field and populate the options using a View. If you're talking about a select field in the wp-admin post editor, then there's no good solution for that problem. There are some other tickets in the forum that mention a filter wpt_field_options, but I don't recommend using it as it's not documented or supported any longer. When you use this filter to set the options in a field, that field cannot be used effectively in other parts of the site, like custom search filters. At this time there is no good solution for that issue or any others caused by using wpt_field_options. If you'd like to see that added, please do submit your request in our suggestion form here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
One workaround is to create one or two options in the field manually, then export your Types settings from Toolset > Export. An XML document will be generated that includes the options you already added. With a bit of XML manipulation, you could add in the other options you want to include and re-import the field information. The new options will then be available.
My issue is resolved now. Thank you!