Setting a limitation on the number of posts Answered
Hi! I have a question - is there any simple way to add an "Edit Post" button that will hide the "Create Post" button if a user already has a post? I currently use the "data-ms-content = members/!members" to show / hide the two current buttons, but I'd like to make it so a user can't create unlimited posts but more so is prompted to edit their post or delete it. I use Webflow CMS and Make for the users to Create, Edit & Delete their posts.
I was thinking of something like a "hasPost" custom field that will be given the value TRUE when a post is created and removed once a post has been deleted but how can I then tell Webflow/Memberstack which button to hide/show?
Thanks!
Comments
1 comment
Hey Jesse 👋 The custom field idea could work. You'll need some custom code which checks to see if the value is true and then change the display state of the buttons accordingly. You might be able to use or modify this code here:
https://docs.memberstack.com/hc/en-us/articles/11264724752667--Code-Display-or-Hide-Elements-Based-on-Custom-Fields
Please sign in to leave a comment.