Home › Forums › Add-ons › Flexible Content Field › Flexible Content Layout Title Manipulation › Reply To: Flexible Content Layout Title Manipulation
Start here https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.