Panel-fields -> select

Hello everyone,
how can I use an external API to create a list of options?

Thank You
Stefano

I’m afraid there’s no way to solve this at the moment. I never actually thought about this, but it’s indeed a fantastic idea to offer this option. I will think about how this could be implemented.

1 Like

I just opened a Github issue for it: https://github.com/getkirby/panel/issues/381

Ok i understand…
A solution would be to create a new field “select_custom” and retrieve data from external APIs?

Stefano

Yes, right now that would be the best option. Just copy the select field from the panel core as a starting point.

ok I proceed in this way…

Thanks

I have thought of another way to populate selects: using a local text file.

My use case is a list of countries. I could just list them all in the blueprint, but it the list could be very long, and if I need the same list in several blueprints I’ll have to maintain it in several places.
Not a huge deal, but I wondered if you have ever needed such a field, and how you would handle it.
I think at the moment the best option is a custom field or a plugin that would load the text file.