Home › Forums › General Issues › Auto populated sub_field in repeater. › Reply To: Auto populated sub_field in repeater.
You can try to build something in JavaScript to do it on the page. That would be too much code to post here but I can give you the general steps. You need to
1) build an action that fires on the keyup action of the first field
2) Get the value
3) get the closes repeater repeater = e.$el.closest('.acf-repeater')
4) Then locate the sibling field repeater.find('[data-key="field_12345678"] .acf-input input')
5) adjust the value an insert it into the other field
The other option is to do it when the post is saved. See acf/save_post https://www.advancedcustomfields.com/resources/acfsave_post/. Get the values from the repeater and use https://www.advancedcustomfields.com/resources/update_row/ to update the other field.
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.