Home › Forums › ACF PRO › Populate drop-down from another drop-down › Reply To: Populate drop-down from another drop-down
Doing this will be fairly complicated. I do not know of any examples for doing this exactly but there are some examples of other cases available of the web if you do a google search for
acf populate seclect field based on another field
I can give you a rough outline of what you need to do.
The first step will be to use an acf/prepare_field filter to dynamically populate the choices for the second select field based on the first field. This is necessary so that if there is a currently selected value that this value is include in the available choices. Without this step the selected choice will be un-selected when the page is reloaded.
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!
🗓️ Just one more day until the next session of ACF Chat Fridays! Make sure to register for the latest updates on what’s coming in ACF 6.1!— Advanced Custom Fields (@wp_acf) March 30, 2023
📆 Friday 31st March 3pm UTC
👉 Register here - https://t.co/3UtvQbDwNm pic.twitter.com/7xtEJakeQN
© 2023 Advanced Custom Fields.