I think, I’ll have more time on Tuesday to look at your issue. I’m still moving from Windows to Linux, migrating data and trying to rebuilt by development setup… If I forget about it, answer here and mention my name, so I’ll get a mail notification.
Your select field needs to be able to get dynamic options instead of static ones.
The select field needs to know, where to get these options.
If where doesn’t exist, you have to define it.
I wrote the SelectRequestOptions addon in the past to solve 1. and 2. and also to have some options for pretty rendering.
For 3., you have to write your own admin ui endpoint, that delivers your data.
/config/bootstrap.php:
$app->on('admin.init', function() {
$this->bind('/custom', function() {
$data = $this->module('singletons')->getData('generalsettings');
$positions = $data['job_position'];
// maybe you have to reformat this data so it matches the select options format
return $positions;
});
});
Now you can call https://cockpiturl.com/custom while you are logged in and you have a pretty json string of your singleton field.
Now you could build your own select field that requests your custom route and displays the options or you use my addon, where I did that step for you already.
No, I only implemented radio buttons and a switch to display a tags field or a color field in the SelectRequestOptions addon. When I wrote that addon, my use case was to have select fields for categories and colors, that are defined in a different collection.
I have a question about this SelectRequestOptions…
I crate a collection to put ingredients and i would like to create a multiple select on my product collection and take more than one ingredient, im trying something like this: