Data-binding
Learn how to use data-binding in your forms and pages.
Data-binding, <div> and <span> elements
<div> and <span> elementsproduct* = SelectBox(
| question = Product | options = T-Shirts, Socks
| selected = T-Shirts | subfield
)
price* = NumberInput(
| question = Price | unitEnd = $ | subfield | min = 1
)
quantity* = NumberInput(
| question = Quantity | subfield | min = 1
)
[.col-4]
Selected: {$ product $}
::: [.col-8 .text-end .xs:text-start {$ price quantity $}]
{% if price and quantity -%}
Total: ${{ price }} × {{ quantity }} = ${{ price * quantity }}
{% else -%}
Total: Set price and quantity
{% endif %}
:::Last updated