Skip to main content
RapidDev - Software Development Agency
bubble-tutorial

How to set up a discussion forum in Bubble

Set up a discussion forum in Bubble by creating Data Types for Categories, Topics, and Replies with proper relationships. Build a category listing page, a topic list with pagination, a topic detail page showing threaded replies, and posting workflows. Add basic moderation tools like pinning topics and flagging content to keep discussions productive.

What you'll learn

  • How to create a data model for forum categories, topics, and replies
  • How to build category and topic listing pages with Repeating Groups
  • How to implement posting and reply workflows
  • How to add basic moderation tools like pinning and flagging
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner8 min read25-30 minAll Bubble plansLast updated March 2026RapidDev Engineering Team
TL;DR

Set up a discussion forum in Bubble by creating Data Types for Categories, Topics, and Replies with proper relationships. Build a category listing page, a topic list with pagination, a topic detail page showing threaded replies, and posting workflows. Add basic moderation tools like pinning topics and flagging content to keep discussions productive.

Quick facts about this guide
FactValue
ToolBubble
DifficultyBeginner
Time required25-30 min
CompatibilityAll Bubble plans
Last updatedMarch 2026

Setting Up a Discussion Forum in Bubble

A discussion forum lets users post questions, share ideas, and have conversations organized by categories. This tutorial walks you through building a simple but functional forum in Bubble — from the data structure to the UI to the posting workflows. Perfect for community apps, support forums, or knowledge-sharing platforms where you need categorized, threaded discussions.

Prerequisites

  • A Bubble account with an app open in the editor
  • User authentication set up (sign up and login flows)
  • Basic understanding of Data Types, Repeating Groups, and workflows

Step-by-step guide

1

Create the forum Data Types for categories, topics, and replies

Go to Data tab → Data types. Create 'ForumCategory' with fields: name (text), description (text), sort_order (number), icon (text). Create 'Topic' with fields: title (text), body (text), author (User), category (ForumCategory), is_pinned (yes/no), is_locked (yes/no), view_count (number), reply_count (number), last_activity (date). Create 'Reply' with fields: body (text), author (User), topic (Topic), created_date (date). The reply_count and last_activity fields on Topic are denormalized counters that you update via workflows for performance.

Expected result: Three Data Types (ForumCategory, Topic, Reply) are created with all relational fields.

2

Build the forum categories listing page

Create a page called 'forum.' Add a Repeating Group with Type of content 'ForumCategory' and Data source 'Do a search for ForumCategories' sorted by sort_order. In each cell, display: the category name (Text, bold), description (Text, smaller), and a count of topics in that category (Do a search for Topics where category = Current cell's ForumCategory:count). Make each cell clickable: add a workflow 'When Repeating Group ForumCategory's cell is clicked → Go to page forum-category → send data: Current cell's ForumCategory.'

Expected result: The forum page shows all categories with their names, descriptions, and topic counts.

3

Build the topic listing page for each category

Create a page called 'forum-category' with Type of content set to ForumCategory. Add a heading that displays 'Current Page ForumCategory's name.' Add a Repeating Group with Type 'Topic' and Data source: 'Do a search for Topics where category = Current Page ForumCategory, sorted by is_pinned descending then last_activity descending.' This shows pinned topics first, then recent activity. In each cell, show: title, author name, reply_count, last_activity formatted as relative time, and a pin icon if is_pinned is yes. Add a 'New Topic' button at the top.

Pro tip: Set the Repeating Group to show 15-20 items per page and add page navigation buttons. Avoid loading all topics at once — forums can have thousands of topics.

Expected result: Clicking a category shows its topics sorted by pinned status and recent activity, with topic metadata visible.

4

Create the topic detail page with replies

Create a page called 'topic' with Type of content 'Topic.' Display the topic title (H1), body (multiline text), author name, and creation date at the top. Below, add a Repeating Group with Type 'Reply' and Data source: 'Do a search for Replies where topic = Current Page Topic, sorted by created_date ascending.' Each reply cell shows: author name, created_date, and body text. At the bottom, add a Multiline Input for composing a reply and a 'Post Reply' button.

Expected result: The topic page shows the original post followed by all replies in chronological order, with a reply form at the bottom.

5

Build the posting and reply workflows

For new topics: On the forum-category page, when 'New Topic' is clicked, show a popup with Input fields for title and a Multiline Input for body. When 'Submit' is clicked: Create a new thing Topic (title, body, author = Current User, category = Current Page ForumCategory, last_activity = Current date/time, reply_count = 0). Then Go to page 'topic' with data = Result of step 1. For replies: When 'Post Reply' is clicked on the topic page: Create a new thing Reply (body = Input's value, author = Current User, topic = Current Page Topic, created_date = Current date/time). Then Make changes to Current Page Topic: reply_count = reply_count + 1, last_activity = Current date/time. Reset the input.

Expected result: Users can create new topics and post replies, with topic metadata (reply count, last activity) updating automatically.

6

Add basic moderation tools for admins

Add a 'role' field to the User Data Type if you have not already (text: admin, moderator, member). On the topic page, add conditional buttons visible only to admins: 'Pin Topic' (Make changes to Topic: is_pinned = yes), 'Lock Topic' (Make changes to Topic: is_locked = yes), and 'Delete Topic' (Delete thing: Topic, then Go to page forum-category). When a topic is locked, add a conditional on the reply form: 'When Current Page Topic's is_locked is yes → This element is not visible' and show a message 'This topic is locked.' Add a 'Flag' button on each reply that creates a 'Flag' Data Type record for moderator review.

Expected result: Admins can pin, lock, and delete topics. Users can flag inappropriate replies. Locked topics prevent new replies.

Complete working example

Workflow summary
1DISCUSSION FORUM DATA MODEL & WORKFLOWS
2============================================
3
4Data Types:
5 ForumCategory: name, description, sort_order, icon
6 Topic: title, body, author (User), category (ForumCategory),
7 is_pinned (yes/no), is_locked (yes/no),
8 view_count (number), reply_count (number),
9 last_activity (date)
10 Reply: body, author (User), topic (Topic), created_date
11 Flag: content_type (text), content_id (text),
12 reporter (User), reason (text), status (text)
13
14Pages:
15 forum category listing
16 forum-category topics in category (Type: ForumCategory)
17 topic topic detail with replies (Type: Topic)
18
19New Topic Workflow:
20 Trigger: Button Submit in New Topic popup
21 Action 1: Create Topic
22 title = Input Title's value
23 body = Multiline Body's value
24 author = Current User
25 category = Current Page ForumCategory
26 last_activity = Current date/time
27 reply_count = 0
28 Action 2: Go to page topic, data = Result of step 1
29
30Post Reply Workflow:
31 Trigger: Button Post Reply clicked
32 Only when: Current Page Topic's is_locked is no
33 Action 1: Create Reply
34 body = Multiline Reply's value
35 author = Current User
36 topic = Current Page Topic
37 created_date = Current date/time
38 Action 2: Make changes to Current Page Topic
39 reply_count = Current Page Topic's reply_count + 1
40 last_activity = Current date/time
41 Action 3: Reset Multiline Reply input
42
43Moderation Workflows:
44 Pin: Make changes to Topic is_pinned = yes
45 Lock: Make changes to Topic is_locked = yes
46 Delete: Delete Topic Go to page forum-category
47 Flag: Create Flag (content info, reporter, reason)

Common mistakes when setting up a discussion forum in Bubble

Why it's a problem: Not denormalizing reply count and last activity on the Topic type

How to avoid: Add reply_count and last_activity fields to Topic and update them in the reply workflow using 'Make changes to a thing.'

Why it's a problem: Loading all replies at once without pagination

How to avoid: Set the replies Repeating Group to show 20-25 items per page and add 'Load more' or pagination buttons.

Why it's a problem: Using only client-side hiding for moderation controls

How to avoid: Use Privacy Rules on the Topic and Reply Data Types to restrict modification and deletion to admin roles at the database level.

Best practices

  • Denormalize frequently-displayed counts (reply_count, view_count) on the Topic Data Type for performance
  • Sort topics by is_pinned descending, then last_activity descending to show pinned topics first
  • Paginate topic lists and reply lists to keep page loads fast
  • Add Privacy Rules to restrict topic deletion and moderation to admin users
  • Use a Flag Data Type for user reports instead of deleting content immediately
  • Track view_count by incrementing it in a 'Page is loaded' workflow on the topic page
  • Format dates as relative time ('2 hours ago') for a modern forum feel

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to build a discussion forum in Bubble.io with categories, topics, replies, and basic moderation. What Data Types do I need, how should I structure the topic listing with pinning and sorting, and how do I build the posting and reply workflows?

Bubble Prompt

Build a discussion forum with ForumCategory, Topic, and Reply data types. Create a categories page, a topic list page sorted by pinned and recent activity, and a topic detail page with threaded replies. Add new topic and reply workflows, and include moderation controls for pinning, locking, and deleting topics.

Frequently asked questions

Can I add rich text formatting to forum posts?

Yes. Use a Rich Text Editor plugin (like the one from ZeroQode) instead of a plain Multiline Input. Store the HTML output in the body field and display it using a Rich Text element.

How do I prevent spam in the forum?

Add rate limiting by checking if Current User's last topic creation was less than 5 minutes ago. Also require email verification before allowing posts, and use the Flag system for community-driven moderation.

Can I add email notifications when someone replies to my topic?

Yes. In the reply workflow, add a 'Send email' action to the topic author's email. Include the reply text and a link back to the topic page.

How do I track how many times a topic has been viewed?

Add a 'Page is loaded' workflow on the topic page: Make changes to Current Page Topic → view_count = view_count + 1. Add an 'Only when' condition to exclude the topic author from incrementing their own view count.

Will a forum with thousands of topics perform well in Bubble?

Yes, with proper optimization. Use database constraints (not client-side filters), paginate Repeating Groups, and denormalize counts. Forums with tens of thousands of topics work fine when built correctly.

Can RapidDev help build a custom community forum?

Yes. RapidDev builds custom community platforms in Bubble with features like threaded discussions, reputation systems, advanced moderation, and real-time notifications.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation
Matt Graham

Written by

Matt Graham · CEO & Founder, RapidDev

1,000+ client projects delivered. Columbia University & Harvard Business School alumnus, U.S. Navy veteran. About the author →

Learning is great. Shipping is faster with help.

Our engineers have built 600+ apps on Bubble and the tools around it. If your project needs to be live sooner than your learning curve allows — book a free consultation.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.