# How to Replace Placeholders with Actual Data in Bubble

- Tool: Bubble
- Difficulty: Beginner
- Time required: 10-15 min
- Compatibility: All Bubble plans
- Last updated: March 2026

## TL;DR

Replacing placeholders with actual data in Bubble uses dynamic expressions — you click 'Insert dynamic data' in any text or input element and select a data source like Current User, a search result, or a URL parameter. The placeholder text is replaced with live values from your database at runtime. This tutorial covers the basics of dynamic expressions, common data sources, and troubleshooting when data does not appear.

## Overview: Dynamic Data in Bubble

This tutorial explains how to replace static placeholder text with live data from your database using Bubble's dynamic expression system.

## Before you start

- A Bubble app with at least one Data Type containing records
- Elements on a page that currently show static placeholder text
- Basic understanding of Bubble's Data tab and element properties

## Step-by-step guide

### 1. Understand dynamic expressions in Bubble

Dynamic expressions are Bubble's way of inserting live data into elements. Instead of typing 'John Smith' as static text, you use a dynamic expression that pulls the actual user's name from the database. Dynamic expressions appear as blue highlighted text in the editor. They can reference Current User fields, page data, search results, custom states, URL parameters, and calculated values.

**Expected result:** You understand that dynamic expressions replace static values with live database data shown as blue text.

### 2. Replace text with Current User data

Select a Text element that currently shows placeholder text like 'Welcome, User'. Click on the text content in the property editor. Delete the placeholder. Click 'Insert dynamic data' (the blue button that appears). Type 'Current User' and select it. Then select the field you want — 'Current User's first_name'. You can combine static text with dynamic data: type 'Welcome, ' then insert 'Current User's first_name'. The result displays as 'Welcome, [blue: Current User's first_name]'.

> Pro tip: You can chain fields: 'Current User's company's name' goes through the User → Company relationship to get the company name.

**Expected result:** Text elements display the actual user's data instead of static placeholder text.

### 3. Replace placeholders with page and search data

For pages with a content type (like a Product detail page), use 'Current page's Product's [field]' to display product data. For data from searches, click 'Insert dynamic data' → 'Do a search for [Type]' → add constraints → ':first item's [field]'. You can also reference data from parent groups: inside a Repeating Group cell, use 'Current cell's [Type]'s [field]' to display each row's data.

**Expected result:** Placeholder text is replaced with data from page content, searches, and Repeating Group cells.

### 4. Format dynamic data for display

Dynamic data often needs formatting. For dates: append ':formatted as' and choose a format (MM/DD/YYYY, March 28, 2026, etc.). For numbers: use ':formatted as' with currency ($1,234.56) or decimal places. For text: use ':truncated to 100' to limit length with ellipsis, ':uppercase' to change case, or ':find & replace' for substitutions. Combine formatters by chaining them.

**Expected result:** Dynamic data displays in the correct format for dates, numbers, and text.

### 5. Troubleshoot when dynamic data shows as empty

If a dynamic expression shows nothing: 1) Check that the data exists — verify records exist in the Data tab. 2) Check Privacy Rules — they may block field access for the current user. 3) Check the data source — if the page type is not set, 'Current page's [Type]' returns empty. 4) Check for null fields — the record exists but the specific field is empty. Add placeholder text using the 'Placeholder' property or a conditional that shows default text when the expression is empty.

**Expected result:** You can diagnose and fix cases where dynamic expressions do not display data.

## Complete code example

File: `Workflow summary`

```text
DYNAMIC EXPRESSIONS — REFERENCE
==================================

COMMON DATA SOURCES:
  Current User's [field]
  Current page's [Type]'s [field]
  Current cell's [Type]'s [field]
  Parent group's [Type]'s [field]
  Do a search for [Type]:first item's [field]
  Get data from page URL's [parameter]
  Page's [custom_state]

FORMATTING:
  Date: :formatted as 'MM/DD/YYYY'
  Number: :formatted as '$#,##0.00'
  Text: :truncated to 100
  Text: :uppercase / :lowercase
  List: :count / :first item / :join with ','

TROUBLESHOOTING EMPTY DATA:
  1. Check data exists in Data tab
  2. Check Privacy Rules allow access
  3. Check page type of content is set
  4. Check specific field has a value
  5. Add placeholder/conditional for empty state

BEST PRACTICES:
  Use Placeholder property for empty inputs
  Chain formatters: field:formatted as:truncated
  Combine static + dynamic: 'Hello, [name]!'
```

## Common mistakes

- **Leaving static placeholder text instead of inserting dynamic data** — The element always shows the same text regardless of which user or record is being viewed Fix: Delete the static text, click 'Insert dynamic data', and select the appropriate data source and field
- **Not setting the page type of content when using 'Current page's [Type]'** — Without a page content type, 'Current page's' data source is empty and all dynamic expressions referencing it show nothing Fix: Set the page's type of content in the page settings to match the Data Type you want to display
- **Not handling empty/null fields in dynamic expressions** — When a field is empty, the expression shows nothing, creating awkward gaps or broken sentences in the UI Fix: Use the element's Placeholder property or add a conditional: 'When this expression is empty → show default text'

## Best practices

- Always use dynamic data instead of static text for any user-specific or record-specific content
- Set the page type of content for detail pages so 'Current page's' expressions work
- Format dates and numbers using the ':formatted as' operator
- Add placeholder text or conditionals for potentially empty fields
- Chain field references through relationships: User's Company's Name
- Use 'Current cell's' inside Repeating Groups for row-specific data
- Test dynamic expressions with actual data, not just in the editor preview

## Frequently asked questions

### Can I combine multiple dynamic expressions in one text element?

Yes. You can mix static text with multiple dynamic insertions. For example: 'Hello [first_name], you have [count] messages' with two dynamic expressions.

### Why does my dynamic expression show 'empty' in the editor?

The editor often shows empty because there is no runtime data. Preview the page or use 'Run as' to see actual data from your database.

### Can I use dynamic data in element properties other than text?

Yes. Dynamic data works in: visibility conditions, data sources, colors, URLs, image sources, and virtually any element property with a blue 'Insert dynamic data' button.

### What is the difference between 'Current page's' and 'Parent group's'?

'Current page's' references the page-level data (set by URL or navigation). 'Parent group's' references data from an enclosing Group element's data source. Use Parent group's inside nested elements.

### Can RapidDev help set up data-driven pages in my Bubble app?

Yes. RapidDev can configure dynamic pages, data bindings, and complex expression logic for any Bubble application.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/replace-placeholder-actual-data-dynamic-expression
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/replace-placeholder-actual-data-dynamic-expression
