Update Text
Dynamic text reactivity — anywhere inside an instance.
Enhance your form's interactivity by dynamically updating text content based on user inputs. With the text() reactivity attribute, you can seamlessly bind form data and variables to any text element, providing real-time updates as users interact with your form.
Setup
Attribute: sf-react = text(expression) (see WTF is an expression?)
Where: any text element (like <span>, <div>, or <p>) within the form where you want the text to dynamically update based on form data or user inputs.
Examples
1. Dynamic Text: Display a welcome message using a user's name from the form.
2. Conditional text based on a form input.
3. Display text using the $s variable.
$s variable.Last updated
Was this helpful?