Skip Navigation

[Resolved] How to use Repeatable Fields Group with Conditionals?

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by AtefR7377 4 years, 10 months ago.

Author
Posts
#1410451

Hi,
I have a CPT called "Persons". I display information regarding persons in a table format.

Due to the variation of available information between different persons, I use conditionals.
So if the Date of birth is available, I show a table row with the date of birth..etc

I wanted to add a new row for external links talking about this person. But the number of external websites differ, So I thought of using a repeatable fields group.

I created the group and created a view to show the it, as per the documentation.

I wanted to use conditionals to say: if the repeatable field group of this post is not empty, display the view, but there were no conditionals to do so.

I tried to create the conditional, based on the same logic as the other fields, but it did not display anything.

[wpv-conditional if="( $(wpcf-person-external-url) ne '' )"]
[wpv-view name="person-external-links-repeatable-view"]
[/wpv-conditional]

Is there a proper way to achieve what I want?

thanks in advance.

#1411067

My issue is resolved now. Thank you!