Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Clone field support #25

Closed
tyrann0us opened this issue Dec 16, 2016 · 3 comments
Closed

Clone field support #25

tyrann0us opened this issue Dec 16, 2016 · 3 comments

Comments

@tyrann0us
Copy link
Contributor

tyrann0us commented Dec 16, 2016

I created a field in a field group for pages and and a second field in a field group for a widget. The second field is a clone of the first one.
When I save the widget on the widgets page (wp-admin/widgets.php), the cloned field won't be saved. Can you confirm this?

Edit: I needed to check "Prefix Field Names" to made it work.

@tyrann0us tyrann0us changed the title Klon field support Clone field support Dec 16, 2016
@daronspence
Copy link
Owner

So is this fixed then @tyrann0us ? I haven't spent too much time with the clone field, so I'm not sure why it wouldn't work. ACF Core is responsible for the saving of those values in the admin area.

@tyrann0us
Copy link
Contributor Author

tyrann0us commented Dec 16, 2016

Well prefixing the field seems to work but I encountered something else:
Sometimes clone fields won't show up in the widget. This isn't something reproducible so I can't describe the steps to see this happening. The fact is it happened twice to me while configuring fields.

@daronspence
Copy link
Owner

In re: to your field not rendering, I feel that might be some sort of cache thing. Especially if it's difficult to reproduce. I know ACF does some internal caching but I'm not sure how prevalent it is.

The clone field documentation may provide some insights into why the the field wasn't saved. Likely a naming conflict (which it seems like you discovered). https://www.advancedcustomfields.com/resources/clone/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants