Home Forums Backend Issues (wp-admin) Sorting field groups by drag and drop order Reply To: Sorting field groups by drag and drop order

  • Sorry, it is complicated.

    Is there a way this can be done? Probably, but it would be a lot of work and I can’t really give specific code that will do it. The solution is not an easy one, nor one that I would use.

    You would have to:

    1. Get the user meta value that holds the order of meta boxes for the post type (page) for the user in question
    2. Loop though this array and find entries that match ACF field groups
    3. For each field group get that field group acf_get_field_group() is the function you would use
    4. Get the field for the group acf_get_fields()
    5. Loop though the field list and display each field, this would probably need some complicated logic depending the fields and how you want to output them

    If I needed to give someone the ability to rearrange the order of things I would consider this a good candidate for using flexible content fields.