Most form properties accept either a static value or a function that returns a value. When you pass a function, FormTs automatically re-evaluates it whenever dependencies change.
Instead of label: 'Your Email', you can write label: () => ... and the label will automatically update whenever referenced fields change. No manual refresh needed!
The simplest example: a label that changes based on another field's value.
Show users how many items they've selected - great for checkbox lists with limits.
min/max constraints, this gives users clear feedback. Change the placeholder and label based on user's choice - perfect for contact forms.
Use form.setTitle() with a function to create personalized form headers.
Tooltips that change based on quantity - show discount tiers and encourage bulk orders.
The classic country → city pattern: second dropdown options depend on the first selection.
options property accepts a function! Return different arrays based on parent selection. The city dropdown is disabled until a country is selected. A real-world order form combining all techniques: dynamic title, labels, tooltips, prices, and discount logic.
label: () => `Items (${count} selected)`Show selection count in checkbox lists, file uploads, etc.
options: () => getOptionsFor(parentValue)Country → City, Category → Subcategory, etc.
placeholder: () => getPlaceholderFor(type)Adapt hints based on user's previous choices.
tooltip: () => qty >= 10 ? 'Discount!' : 'Order more'Guide users toward discount tiers or limits.
?. and ?? defaultform.computedValue() if neededNow that you've mastered reactive values, explore these related tutorials: