A repeater fields top level field needs to be unique. Sub fields of a repeater need to be unique within each repeater. For example you can have 2 sub fields named “repeater_1” and “repeater_2” and both of these repeaters can have a sub field named “sub_field”.
The field key is ACF’s internal reference to that specific field, no matter where that field is used. There must be a unique field key for every field created. Logically, if you have the same field key for 2 fields, as long as they are never used on the same WP object you would be okay, but I would not suggest it. It is too easy down the road to alter where the field is shown and then you could have a serious issue. ACF (internally) uses the field key, not the field name, to insure that it’s looking for the right field value.
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘Does field->name have to be unique?’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users