Forum Documentation Showcase Pricing Learn more

How do i create a comment system


#22

Please send link to how to do this


#23

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.is/page?type=page&name=say_hie_feeds__&id=adventist-news-zw&tab=tabs-1


#24

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:


#25

thanks you are a life saver…


#26

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.


#27

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