Support

Account

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!
    
    }