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 adventist-connect-zw | Bubble Editor

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:

12 Likes

thanks you are a life saver…

2 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

Hi @jcindy81 i am really hoping that you are still around! i love what you have done but i am stuck! With the putting in the comment cells source it wont accept just the details you have put in… what have i done wrong! This comments thing has been challenging me hard out and it is driving me nuts!
Screen Shot 2022-05-08 at 3.51.10 pm

Have you figured this out yet? I am trying to get a comment system working as well but having the hardest time with it.

No i have not! still trying haha

I got it working, still trying to figure out the nested replies though

Is it possible to have a reply to a user’s post be private? In other words, only seen by the original poster and that conversation remain private?