Home › Forums › ACF PRO › Clone single field name conflict › Reply To: Clone single field name conflict
if you name both the clone field and the cloned field “text_field” and you only use this once….. to be completely honest, I do not know if this would cause a conflict. It might, but shouldn’t. I would try to stay away from doing this. It could be that when you do
get_field('text_field') that ACF may be getting confused about getting the clone or the cloned field.
If you name them differently and you do not use prefixing then you should use
get_field('text_field') but if you do use prefixing then you should use get_field(‘clone_field_text_field’)`.
Going to be completely honest, I have tried clone fields and I don’t much like them. They reduce the amount of work creating field groups, but they add to that work back in when coding the front end. It can save some time when everything is exactly the same about the fields but for me there’s not enough of an advantage with using them. And I have had problems with them when using them in flex field layouts and repeater fields.
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!
❓Ever wondered when and why ACF uses JSON instead of the database? Check out our summary of the most recent session of ACF Chat Friday for the answer, and make sure to register for the next session.— Advanced Custom Fields (@wp_acf) February 23, 2023
© 2023 Advanced Custom Fields.