How to conditionally display a metrics toggle in Webflow CMS based on project access investment status?
Hello, I need some help. In my web flow CMS page called "All Projects" I have another collection called "project access" and in that collection there's an option field "investment status" and I want this investment status to control what users see, right now i have a toggle button to show metrics and i want this button to be available only if users have that "invested" option on there project access option field. Any help ASAP would help so much. thank you
Comments
3 comments
Hey Alex Douglas, Can you share a sandbox link of the site where you have these collection pages enabled? It will help in suggesting some ideas based on what's already been implemented there.
https://preview.webflow.com/preview/cgc-d95f3e?utm_medium=preview_link&utm_source=desi[...]&itemId=6968c1bf2318bffcb812aeba&locale=en&workflow=preview
If you look to the right you'll see the form and the request access button, I don't want this to show if there's a field in "project access" that has invested that way when users go to explore page they will have that form and request button but if a user is already invested they cant see it because it doesn't make sense too. Iv tried a collection of project access and filter by current project and investment status but changing others investment status changes all.
Any help asap would be beyond greatful
Hey Alex Douglas, I can see you have filter enabled on the collection list which contains the toggle to check if the investment status = invested which should show the toggle only if a project has the relevant status, but this will work for all users irrespectively. So, if you want it to be user-based, i.e. show the toggle based on the current logged in user, and you have the Member ID stored in the collection who have already invested in a project, then you can make use of this memberscript to achieve your use-case and show / hide it based on the current logged in user. If multiple members can invest and the conditional visibility should work accordingly, you might need to customize the script a bit to fit for your use-case. Hope this gives you some idea.
Please sign in to leave a comment.