Home › Forums › General Issues › Does field->name have to be unique? › Reply To: Does field->name have to be unique?
A group field is a repeater field with one row.
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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We’re hard at work on ACF 6.1, and Beta 1 is now available 🚀
— Advanced Custom Fields (@wp_acf) March 16, 2023
This release includes custom post type and taxonomy registration, an improved experience when selecting field types, PHP 8.1 and 8.2 compatibility, and more!
Let’s take a look 🧵https://t.co/Y0WcAT11l4
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.