Show / Hide Element in CMS dynamic list using Conditional Visibility BASED ON CMS COLLECTION PAGE

So Conditional Visibility is an amazing feature, however there’s one limitations that bothers me: If the element that I want to apply conditional visibility is placed in CMS dynamic list, then it will offer set the condition based on that collection fields, and if the element IS NOT inside CMS dynamic element but lets say inside CMS dynamic page, then I can use fields from That collection. However what if I have Element placed inside dynamic list that is places on the template page? In that case it will only give options to choose condition from Collection selected for that List but not from the page.

If you look into my website there is two elements “Start Lesson” and “Content is locked”, I want each of them to be visible based on “Status” field from Members Collection. But because elements are in Dynamic List, this option is not available. Any suggestion how to work arround? I’ve tried custom code with IF condition but for some reason not working either… My custom code:

<script>
if(status == "paid") {
document.getElementByClassName('Unlocked').style.display = 'block'; 
document.getElementByClassName('Locked').style.display = 'none'; 
}else {
document.getElementByClassName('Unlocked').style.display = 'none'; 
document.getElementByClassName('Locked').style.display = 'block'; 
}
</script>

Here is my public share link: https://preview.webflow.com/preview/ltw-site-ebc633?utm_medium=preview_link&utm_source=designer&utm_content=ltw-site-ebc633&preview=d11121f8cf756790a7471060acb5202c&pageId=5f2a792abc924b3947eff419&itemId=5f2add82531c1a2b2de6c8aa&mode=preview
(how to access public share link)

1 Like

Ever find a solution to this? I am running into the same issue.