Home Forums ACF PRO Group within Repeater subfield update


Group within Repeater subfield update

  • Hi,

    I’ve been struggling with a simple use case. I have a repeater that has a group with two subfields, a number and url.

    I’m building a custom post type on the fly and want to pre-populate the group’s sub-fields.
    (repeater r1)
    –> various fields
    –> (group g1)
    —-> (url)link
    —-> (number)amount

    In a first instance I do add_row() to add some specific fields in the repeater (but not the group), and get the repeater index back from the function call. successfully.

    Then I want to setup the group fields in that repeater row. I’ve tried everything: add_row (passing a nested array for the group and it’s subfields), add_sub_row, update_sub_field, update_field, update_row. Using keys and not with named keys. Prepending subfield names with the group field name seperated by underscore…

    Doing this outside of the loop so thought keys would solve, but nada.
    I’ve found little to no real explicit documentation around updating fields in a group, wouldn’t imagine it would be anything special, particularly when using keys. What is the convention to use in this case? I’m a whiskey shot away from throwing in the towel and just hardcore adding the meta values directly into wordpress.

  • I’m having the same issue. Did you find a solution?

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

The topic ‘Group within Repeater subfield update’ is closed to new replies.