I’ve got a Flexible Content Field containing multiple layouts, and each layout has a number of fields added via wp-admin. When I use acf_add_local_field() to programmatically add a field to one of these layouts, the new field is added but all other fields in the Flexible Content Field (not just that one layout, but all layouts) disappear.
I can’t find anything on this in the docs, and perhaps that’s my search skills being sub-par, in which case feel free to point me in the right direction.
Is this the intended behaviour? Is there a way to get around it and keep the fields defined in admin as well as the programmatically defined field?