Support

Account

Home Forums General Issues Integrate ACF in a custom admin layout with dynamic content boxes Reply To: Integrate ACF in a custom admin layout with dynamic content boxes

  • Thank you for your patience.

    I actually meant that I get the complete nested array of a repeater with get_field() with field keys instead of field names.

    After researching for a while, I realized that the last parameter format does exactly that. This gives me field keys instead of names.

    I have now found a solution that works quite well:

    1.) I use acf_get_field_group() to read in the field group that I would like to display in my boxes.

    2) With acf_get_fields() I get the corresponding fields in an array and can cycle through them.

    3) With acf_get_field() I get the field object in the loop that I need later to display the field.

    4) With get_field() and the last parameter set to false, I get the representation of the data that has already been saved for this field

    5) I pass all this to acf_render_field_wrap() and so get the representation of the control in my box

    Finally, I need to make it possible to have several boxes with the nested fields at the same time. At the moment it is only possible with one box.