Hi,
I’m trying to create fields via php following the instructions found here https://www.advancedcustomfields.com/resources/register-fields-via-php/
It’s ok for basic fiedls like Text, but I was wondering how to register a Repeater type field with a sub field (an image) in it.
Thanks for your help !
J
When I have these type of question I go into ACF admin and I crate a similar field set the way I want it to be and then export that to PHP to see what the code should look like.
A repeater is just like any other field except it has an index named “sub_fields” that is an array of fields defined in the same way as they would be when not in a repeater.
Haha that’s a brilliant idea! Thank you John