How to restrict members to a single comment per channel while enabling comment data export via API? Answered

Post author
John Ramos

Is there a way to limit a member to 1 comment per comment channel?

Comments

4 comments

  • Comment author
    Duncan from Memberstack

    Hey John 👋 Not possible natively, but you can do it with javascript. You could save the comment count + page slug to the member's JSON. If they have 1+ comment then you can disable the form submission

    https://rey.memberstack.com/ can help you write the code

    0
  • Comment author
    John Ramos

    Sweet, thanks Duncan!

    0
  • Comment author
    John Ramos

    Is there a way to export comment data through the API?

    0
  • Comment author
    Raquel Lopez

    It's not documented yet, but you can fetch the comments information using the memberstackDom library in the frontend. You can use the getPosts() method

    $memberstackDom.getPosts({
    channelKey: string
    order?: "newest" | "oldest"
    after?: string
    limit?: number
    })
    0

Please sign in to leave a comment.