I’m using ACF Pro on my site and I have a “products” repeater filed in the backend.
Inside the repeater field, I have a few subfields and one of them is True/False if the product is not available anymore. And if that field is checked, there is a conditional logic that will hide all other subfields for that specific product.
Then, when I have more products that are not available, and if I do the collapse of the products rows and do the re-order, the values of subfields for those products with a conditional logic will be shuffled.
It is not the collapsing of the repeaters that is causing this, it is the conditional logic that is hiding the fields.
There isn’t any way to avoid this when using ACF’s conditional logic for sub fields in a repeater. The reason for this is that fields hidden by conditional logic are not submitted because the inputs are marked as “disabled” when hidden.
The easiest solution is to not use conditional logic for sub fields of repeaters. Is there any reason to hide the values other than not looking at them?
There is a very old topic were Elliot (the original developer) provided code to alter the way ACF works. However, I have no idea if this still works as it was written for ACF version 4 and ACF has changed a lot since then. Given this there is probably a way to do this in the current version of ACF, but I do not know details of how that could be done.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users