Home Forums Feature Requests load_field : add more data, to make it more flexible programmatically Reply To: load_field : add more data, to make it more flexible programmatically

  • Before I start, I am not a developer of ACF, just another user that knows a lot about how it works. If you want an official reply from the developers you should submit a support ticket here

    Most of what your looking for is not really possible in ACF. Fields are not really aware of other fields. Sub fields are only minimally aware of their parent field. Field so not have any data the will allow them to know what other fields are siblings. In order to do this large amounts of data and arguments would need to be used in all function calls, which would seriously over-complicate the code and as you suspect, possibly cause memory issues.

    However, there are built in functions that will let you get this information if you really want it for a specific field. Most of these functions are not documented on the site because they are not things that the average user will ever need.

    For example, the field does have a reference to it’s parent in $field['parent'] which you could use to get information about the parent field. I believe there is also a function somewhere in ACF that will get the parent field info, but at don’t know exactly what it is. Using the information about the parent you can then probably get it’s sub fields. These methods are the same ones used by ACF to do this kind of thing. All the information is there and you need to use the right functions to get it. Unfortunately, the only real way to get this information is to start digging through ACF code and seeing what it does.