Support

Account

Home Forums Add-ons Repeater Field Importing multiple rows to repeater field

Solved

Importing multiple rows to repeater field

  • FYI I am VERY new to ACF – I know nuttin’.

    I am trying to move existing data – stored in a serialized array – into ACF. I have a group with a repeater field called Product Awards (product_awards, field_67d2d38ce2b16).

    I am iterating over multiple posts and pulled the data from the old array to variables, then using add_row to move them to ACF.

    $row = array(
    'field_67d2d3a9e2b17' => $name,
    'field_67d2d3bbe2b18' => $type,
    'field_67d2d439e2b19' => $score,
    'field_67d2d459e2b1a' => $year,
    );
    add_row('field_67d2d38ce2b16', $row,$prod_id );
    }

    I can see all the relevant data in the postmeta table, but nothing appears in the group form in admin when I edit the products.

    I feel like I’m missing something – but I’ve no idea what. I fell like I need to create something before adding rows to it.

    Any pointers much appreciated.

  • Sorted it, my error.

  • If anyone is looking to import bulk data using a plugin, I recently used the CSV Importer Plus for ACF plugin, which supports importing repeater rows.
    Video tutorialhttps://www.youtube.com/watch?v=2YEQ3o-iR_M

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.