Learn how to build nested comments in Bubble with clear steps that boost app engagement and create smooth, structured discussion threads.

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.
A nested comment system in Bubble works by giving every Comment its own field that points to its parent comment. Top‑level comments have the parent field empty. Replies store the Comment they belong to. Then you display them using a repeating group that searches for comments where Parent is empty, and inside each cell you place another repeating group that searches for comments whose Parent equals Current cell's Comment. This creates the nesting.
Create a data type Comment with these real Bubble fields:
Top‑level comments have Parent = empty. Replies have Parent = the comment they're replying to.
Put a repeating group on the page. Its data source should be:
// Only top-level comments
Search for Comments
constraints:
Post = Current Page Post
Parent is empty
Inside this repeating group cell, add:
The replies repeating group’s data source:
// Children of the current comment
Search for Comments
constraints:
Parent = Current cell's Comment
This naturally nests as deep as you repeat the same pattern.
When the user submits a reply:
// Create a new Comment
Text = Input Reply's value
Author = Current User
Post = Current Page Post
Parent = Custom state reply_to // the comment being replied to
Learn how to seamlessly integrate Bubble.io with Git through our comprehensive step-by-step guide. Perfect for beginners and professionals.
Learn how to seamlessly integrate Bubble.io with Reddit Ads using our easy step-by-step guide. Boost your ad management today!
Explore our step-by-step guide on integrating Bubble.io with AWS S3, making your app development process more efficient and secure.
Follow our step-by-step guide to seamlessly integrate Bubble.io with Lucidchart, enhancing your workflow & productivity.
Learn how to seamlessly integrate Bubble.io and Kentico with our comprehensive, easy to follow step-by-step guide.
Discover easy-to-follow steps for integrating Bubble.io with Box. Boost your workflow and secure your files seamlessly today.
Fix broken workflows | Optimize logic | Boost performance | Scale with confidence