Home › Forums › General Issues › Show sub-repeater options based on parent-repeater option selected › Reply To: Show sub-repeater options based on parent-repeater option selected
To do this you will need to write JavaScript. You will need to attach an event to the first field that makes an AJAX request to the values for the second field and populate the values.
Alternately you can create a script that gets localized with all of the values.
Sorry, I do not have example code that I can supply for this.
Here is an example https://stackoverflow.com/questions/5861090/populating-one-select-box-based-on-the-selection-in-another-select-box-jquery
Info on AJAX in WP https://codex.wordpress.org/AJAX_in_Plugins
Info on localizing scripts: https://developer.wordpress.org/reference/functions/wp_localize_script/
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.