I have created an FAQ page using MetaBox custom fields (based on this tutorial How to create an FAQs page - P4 - Using Meta Box and Bricks - Meta Box). One of the custom fields is an optional URL to a video which is displayed using a Video component. However, if the custom field is blank, I want to conditionally hide the Video component.
I have set up a Condition on the Video component as follows:
Dynamic data
{mb_page_faqs_group_video_link}
is not empty
The issue is that although Bricks resolves the {mb_page_faqs_group_video_link} dynamic data in the Video component, it does not resolve it in the condition, which means that the condition always fails. The Video component is hidden when there is a video_link and shown when the video_link is blank.
Is this a known issue? Are there settings that need to be enabled for dynamic data to work in Conditions?
Hi,
Thanks so much for your report, and welcome to the forum!
Unfortunately, I cannot reproduce the issue. Would you be so kind as to provide a live link and a screencast using https://jam.dev showing and explaining what’s happening?
I have created a Screencast for you and posted it here.
Hopefully it demonstrates the issue, but if you need something with more details, please let me know. The page in question can be found here. This is the page with the Condition set on the container element, which is not displayed despite there being a valid Video Link in the group.
Frontend: The only post with values for the fields is “Persian.” As you can see in the “Brutal Web Design…” post, nothing is output video-wise—even without condition. I also tried it with a nestable accordion, and the result was the same.
Please try again… If it still doesn’t work, please send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase, and we’ll be happy to assist.
Hi,
As already said by email, the problem was that you selected “File URL” as the source for the field. With “Dynamic Data”, it works without problems - i.e. the video element is not output if there is no video link.
There’s no need to use a condition in this case since there is no data, and therefore, no code will be output.