Learn how to manage your FAQs through the Embeddables CMS and display them using an OptionSelector
The Embeddables CMS provides an excellent way to manage your Frequently Asked Questions (FAQs) without needing to modify code. This guide will show you how to set up and use the CMS to control your FAQ content, making it easy for non-technical team members to update questions and answers.
You’ll need a Computed Field to transform the CMS data into the format required by the OptionSelector:
Go to Embeddable Options
Create a new Computed Field (e.g., faq_options)
Add faqs to the inputs
Add the following code:
Copy
Ask AI
// Computed Field: faq_optionsfunction result({ faqs }) { // Sort FAQs by order if the order column exists const sortedFaqs = faqs?.sort((a, b) => (a.order || 0) - (b.order || 0)) || []; // Transform the FAQs into the format needed by the OptionSelector return sortedFaqs.map(faq => ({ text: faq.question, description: faq.answer }));}
Optional: Filter FAQs by Tags
If you added a tags column to your FAQs table, you can filter FAQs in your computed field. For example, to show only pricing-related FAQs:
This lets you create different FAQ sections (like pricing, features, or support) using the same CMS table.
Optional: Add a selector so users can filter FAQs by tag
You can create a dynamic tag filter by adding an OptionSelector above your FAQs. Here’s how:
First, create a computed field to get unique tags (e.g., faq_tags) - this will power the OptionSelector that lets users filter FAQs by tag.
Copy
Ask AI
// Computed Field: faq_tagsfunction result({ faqs }) { // Get all unique tags from FAQs const tags = [...new Set(faqs?.flatMap(faq => faq.tags || []) || [])]; return tags.map(tag => ({ text: tag, value: tag }));}
Then modify your FAQ computed field to accept a selected tag - this will filter the FAQs based on the selected tag, and the results will be passed to the main FAQs OptionSelector:
Copy
Ask AI
function result({ faqs, selected_tag }) { // Filter FAQs by selected tag if one is chosen const filteredFaqs = selected_tag ? faqs?.filter(faq => faq.tags?.includes(selected_tag)) : faqs; // Sort and transform the FAQs return (filteredFaqs || []) .sort((a, b) => (a.order || 0) - (b.order || 0)) .map(faq => ({ text: faq.question, description: faq.answer }));}
Finally, add the two OptionSelectors to your page:
First OptionSelector: Set its key to selected_tag and its “Repeatable Buttons” field to {{faq_tags}} (which uses the first computed field above).
Second OptionSelector: Set its key to expanded_faq and its “Repeatable” field to {{faq_options}} (which uses the second computed field above).
This creates an interactive FAQ section where users can filter FAQs by selecting different tags.
Use the CMS version control system to create and test different FAQ variations before pushing them live. This is especially useful when making major updates to your FAQ content.