Support

Account

Home Forums Add-ons Repeater Field Combine 2 repeater rows with same values Reply To: Combine 2 repeater rows with same values

  • Sorry, I will try to illustrate below:

    pigeons_and_doves is an acf repeater that collects one set of data with two keys
    other_pigeons_and_doves is an acf repeater that collects one set of data with two keys
    when combining them into the array with this sort method it is listing them as

    pigeons_and_doves key values first
    A some name in list (pigeons_and_doves)
    Z some name in list (pigeons_and_doves)
    X some name in list (pigeons_and_doves)

    other_pigeons_and_doves key values first
    F some name in list (other_pigeons_and_doves)
    B some name in list (other_pigeons_and_doves)
    D some name in list (other_pigeons_and_doves)

    so when they are run out in the loop that you advised with the usort they are displaying like this: (pigeons_and_doves all at top of list and other_pigeons_and_doves all at bottom of the list)

    A some name in list (pigeons_and_doves)
    X some name in list (pigeons_and_doves)
    Z some name in list (pigeons_and_doves)
    B some name in list (other_pigeons_and_doves)
    D some name in list (other_pigeons_and_doves)
    F some name in list (other_pigeons_and_doves)

    INSTEAD OF LIKE THIS
    A some name in list (pigeons_and_doves)
    B some name in list (other_pigeons_and_doves)
    D some name in list (other_pigeons_and_doves)
    F some name in list (other_pigeons_and_doves)
    X some name in list (pigeons_and_doves)
    Z some name in list (pigeons_and_doves)