Support

Account

Home Forums General Issues Find all groups of same name, merge field contents

Unread

Find all groups of same name, merge field contents

  • I have the following hierarchy…

    Repeater One (Repeater)
    – Points (Group)
    — Points 01 (Number)
    — Points 02 (Number)
    — Total (Number)

    Repeater Two (Repeater)
    – Points (Group)
    — Points 01 (Number)
    — Points 02 (Number)
    — Total (Number)

    I’m trying to get each ‘Points’ Group, add the individual points fields together and merge them into the Total when saving a post (type ‘Standings’).

    So far I have this…

    add_action('acf/save_post', 'my_acf_save_post', 5);
    function my_acf_save_post( $post_id ) {
    $post_type = get_post_type($post_id);

    if ($post_type == 'standings'){

    CODE HERE

    }
    }

    I know this works as I’ve been able to manipulate the post title easily – but I’m struggling to know where to go next to iterate through the repeaters, find the groups and do the rest.

    Help appreciated!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.