You would have to loop over all of the layouts in the flex field to populate the select field.
I can’t give you any help on dynamic population would work as new layouts are created, not something I’ve ever tried before. But it would involve creating a JS action that triggers when a layout is added or when the field you’re basing it on changes and then writing JS to update the select field(s) choices.
Targeting events on ACF fields would look something like
$('[data-key="field_XXXXXXX"] .acf-field select')
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.