Forum Academy Marketplace Showcase Pricing Features

How do i create a comment system

Please send link to how to do this

hie
what i have is not a blog its a news feed and one comment keeps appearing on all posts. what could be the problem. i want a comment to be specific to a post. here is my data structure

and here is my edit view https://bubble.io/page?type=page&name=say_hie_feeds__&id=adventist-news-zw&tab=tabs-1

Hello. It looks like your issue is in the data structure. There are probably many ways to solve this, given the nature of bubble, but here’s how I went about it, and it works perfectly.

-Create a data type of “post”
-The second data type, you have, which is “comment”.
-The “post” type should have a field for “comment” and its type should be the “comment” data type. Check the box for this is a list, so that multiple comments can be attached to a post.
-The “comment” data type will have a field “post” and its type is the data type “post”. This will not be a list.
-this will allow you to associate comments and posts to one another.
-When the user creates a comment, you will use a workflow to add this created comment to the list of comments on the post. The workflow will add the “post” to the comment that was created.

Here is the setup:

Data type post:


Data type comment:
comment%20type
Very basic UI:

Create a post workflow:

Create a comment workflow step 1:

Create a comment workflow step 2:

Repeating group for Posts:

Comment repeating group, inside of post group:

UI in action:

11 Likes

thanks you are a life saver…

3 Likes

Glad it helped you continue working, and hope it’s clear enough. You may add additional actions to the workflow that reset the inputs after saving the comment, so it’s ready for a new one. And if you want to allow users to edit their comments, it will take some extra work involving inputs and custom states.

okay great ill do that
thanks
ill be back if i need more help pliz

Thanks for spending time to develop this tutorial :slight_smile:

3 Likes

This is cool

really cool

Halo. I was just wondering if this sequence could also be used in the creation of a simplified forum?

Hey thanks a lot for this, so useful!! Do you happen to know how to sort the comments from newest to oldest s the new show up first? thank you