Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
description: >- When building with Webstudio, you get dynamic, not static. This enables providing search and filters to your visitors. Whether you want to filter your blog or create a dashboard, you can use Webstudio
▶️ Using filters to dynamically display content (Airtable example)
{% embed url="https://youtu.be/n5tG2j6_4dw" %}
Overview
Unlike static website builders, Webstudio enables dynamic filtering by:
- User submits search form → values go into URL query parameters
- Page reloads with parameters in URL
- API query uses parameters to filter results
- Collection displays filtered data
Step 1: Create the Search Form
- Add a Form component (not Webhook Form)
- Inside, add: Label + Text Input + Submit Button
- Name the input (e.g., "name") — this becomes the query parameter
Step 2: Create the Results Collection
- Add a Collection component
- Inside, add elements for each field (heading, text, images, etc.)
- Wrap the Collection in a Box to control layout/spacing between items
Step 3: Set Up the API Resource
- Select the Collection's parent element → Settings → Add Variable
- Type: Resource
- Get the curl command from Airtable's API Documentation (Help → API Documentation)
- Paste it — Webstudio auto-parses URL and headers
- Remove
max_recordsandviewparameters to get all records
Step 4: Add Dynamic Filtering
Use the Expression editor to build a dynamic URL with Airtable's filterByFormula parameter:
Basic Filter (always applied)
`https://api.airtable.com/v0/BASE_ID/TABLE?filterByFormula=SEARCH("${system.search.name}",{name})`;
Conditional Filter (only when search param exists)
`https://api.airtable.com/v0/BASE_ID/TABLE${system.search.name ? `?filterByFormula=SEARCH("${system.search.name}",{name})` : ""}`;
Key concepts:
- Backticks (`) create template literals for mixing static and dynamic content
${...}inserts dynamic valuessystem.search.paramNameaccesses URL query parameters- Ternary operator
condition ? ifTrue : ifFalsefor conditional logic - Airtable requires values in quotes:
SEARCH("value",{column})
Step 5: Bind Collection Data
- Select the Collection → Data → bind to
resource.data.records - Bind each element inside:
collectionItem.fields.fieldname
Debugging
- Inspect the resource variable to see the JSON response
- Status 200 = success; 4xx/5xx = error
- Check for "undefined" in your query — means the parameter wasn't found
{% hint style="info" %} You can add multiple filters by extending the filterByFormula with AND/OR logic. Consider building complex expressions in an external code editor, then adapt for Webstudio's variable system. {% endhint %}
Related
- CMS – Understand how dynamic content works in Webstudio
- Collection – Display lists of dynamic data
- Variables – Create and use variables for dynamic content
- Airtable Integration – Connect your Airtable base to Webstudio
- Form – Build forms to capture user input