ACF Repeater Visibliity

I found some issue with visibility conditions with one of my elements when i select acf and the field is a repeater. For example, i want to show only the button if the value inside acf repeater is not empty. Even theres a value inside the repeater field it still hides the button.

Hello @kris,

Sorry to hear you’re having trouble with visibility conditions and repeaters.
Can you confirm that this is a visibility condition you’re trying to apply to a block inside a Repeater block?

Cheers,

I tried on the whole section with repeater inside as well as block inside a repeater but same result.it doesnt show even the condition is true

Hi @kris,

Sorry about this.
Unfortunately I haven’t been able to reproduce your issue, as it is working as expected on my end.

Could you possibly provide a screenshot of your visibility conditions?
Thank you in advance.



here are the screenshot of visibility condition. As you can see i have 3 columns there. There is title image and description. When I apply the above image as condition, it doesnt work and the whole section disappear.

Hi @kris,

I experience the same issue

I have one Repeater Block with a slider layout with a condition that shows if the repeater is not empty,
and a Div with regular Image Block with the Post Featured Image with a condition that shows in case the repeater is empty.
Neither work.
The Repeater just doesn’t show neither if the repeater is empty or not.
The condition on the Div with an image block that show the Featured Image doesn’t work either, and is always displayed either the repeater is empty or not.

I hope it can help…

Best,

J

Hi. I just updated the cwicly plugin and we now have the same layout. But still the visiblity condition doesnt work. I tried using your approach leaving the field blank and just select the repeater field but it doesnt work either.

Sorry I was editing my response after a second look and as you will see, I am experiencing the same problem.
Glad you updated though, that can only help :wink:

I think there might be a slight confusion on the condition role in this particular instance, or I’m misunderstanding as the repeater conditions on my side are functioning correctly.

Basically, the repeater conditions apply to the repeater rows themselves.

When you select What’s inside title, you’re asking Cwicly to check if - while in the repeater loop - the specific field in the specific row currently being queried is empty or not.

At no time are you asking Cwicly to check if the What’s inside repeater is empty or not, nor if any of the What’s inside title rows are empty or not.

Having said that, a general condition for a repeater as a entity isn’t yet available in the conditions options, but sounds like something I can definitely see as being necessary.

In the meantime, I recommend using a return function if your aim is to have a more global approach in checking repeater fields as a whole.

Please let me know if I’m still missing something here.

Thank you @Louis for the details

So, in a case nothing as been added to the Repeater field, aka every rows are empty, the condition ACF Repeater Repeater Field Is Empty should be fulfilled, right?

So if I want to display the Repeater only when it contains something, I should apply to the Repeater, the Condition Is Not Empty, but when I do, it is just never displayed.

Am I missing something?

Be careful with you repeater field,
if you delete the content in the row, that does not delete the row it self, to get an empty row or an empty repeater, you need to delete the whole row (don’t the right - sign on roll over).

When you do so, the visibility condition works, and you can now even choose between the overall repeater or the value of one of the fields in the row!

Youhou!!!

Thank you @Louis and the whole Cwicly team!!!

J

Hi @JuGa,

As mentioned in my previous comments.

Your function tests the repeater field as a whole. A repeater contains fields within. The Cwicly conditions for repeater fields test the specific field inside the repeater and the row it’s currently querying.

Hi @Louis,
yes it is what my function does, because this is what I was looking for., but if the repeater is empty, doesn’t that mean that every field within are as well?

Can you share with me the situation you found the condition on the repeater working?

Thank you,

J

Hello @JuGa,

As indicated in my previous messages, the current Repeater conditions (when an inner field is selected) only apply to the row that is being queried at the time, not the entire Repeater.

Having said that, @kris and yourself did point out that there was no global condition to check if a Repeater was empty or not.

This is addressed in 1.2.9.4 with the Overall condition.

Hope that clears things up a little.

Cheers,

1 Like

It does and it works wonders!
Especially when you delete empty rows :wink:

I got rid of my snippets, but really love that I have the possibility to use a function in the Condition as it opens to really any possibility!!

Thank you again @Louis for your great responsiveness and great job!

wow. This is great. I jus tested it and it works fine now. Its nice that you guys fixing it cwicly : ) Thank you cwicly team.

1 Like