Home Forums Add-ons Repeater Field Manually add image to nested repeater


Manually add image to nested repeater

  • Hello,

    I have a ACF 5.0 field group structured like this:

    type : name
    repeater : revision
    – repeater : rev_files
    — file : rev_file


    So I have a repeater in a repeater with a file field. I need to manually add an image to the file field. I can’t seem to get it to work.

    Currently I’m trying the command update_sub_field. This is way I’m trying to update the field: update_sub_field( array(‘revision’, 1, ‘rev_files’, 1, ‘rev_file’ ), $img_attachement_id );

    Note the first repeater is already containing data, it exists, but the rev_files is completely empty.

    Any suggestions or recommended documents?


  • did you manage to solve this?

  • Try using the field keys instead of the field names. It may not be working because you’re adding a value rather than updating an existing value and it likely has the same problem that update_field() has

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

You must be logged in to reply to this topic.