Home › Forums › Feature Requests › Edit Group and Field Keys › Reply To: Edit Group and Field Keys
I don’t think that globally unique field names would be an asset for everyone. For example, I build fields with the same names purposefully so that I can use the same code to retrieve them. A field group on one post type may be 50% the same as another field group on another post type. Or I may have multiple layouts that are 90% the same. With the same name I can build functions for getting the values and use them rather than different coding for every group.
I did some testing. It is possible to change the field keys when editing the field group. This is what I did:
I don’t know why this works, didn’t did that far. But given this it should be possible to create some custom JavaScript to remove the class from the wrapper, change the hidden field key field into a text field. Then you can change it and remove the JS when dev is done.
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 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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.