Home › Forums › Front-end Issues › ACF Form Repeater Populate › Reply To: ACF Form Repeater Populate
Hi @bmds,
Since localstorage is Javascript-based you don’t really have much choice but to read the localstorage data and create new rows and insert the values.
Since it’ll be very hard for you to replicate how the rows are structured I’d recommend just triggering the “add row” button with JS thus letting ACF do the creation.
Something like:
jQuery('.acf-repeater-add-row').trigger('click', function(){
//Delay a function a few hundred millseconds to give ACF time to create the row then do your own insertion. Preferably via function call
setTimeout(insertLocalstorageData,500)
});
function insertLocalstorageData(){
//Do stuff!
}
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.