# Variable Fields

In this example we have a simple quantity field that allows us to choose any number. As soon as we hit the number 1, a hidden field (that is currently set to be a variable field) will get a new value, in our case this is 10. After that a calculation field will count both the quantity and the variable field together resulting in 11 if the quantity is set to: 1. But if the value is other than 1, it will contain the value of 5. So the result will become 7 when quantity is set to 2.

Below we have setup a simple example of what you can do with variable fields.
In this example you can see how variable fields can help you to change values dynamically on the fly.

In this example we have a simple quantity field that allows us to choose any number. As soon as we hit the number 1, a hidden field (that is currently set to be a variable field) will get a new value, in our case this is 10. After that a calculation field will count both the quantity and the variable field together resulting in 11 if the quantity is set to: 1. But if the value is anything else, it will contain the value of 5. So the result will become 7 when quantity is set to 2.

Field is required!
Field is required!
Amount
Field is required!
Field is required!
Variable field has been placed here (not visible to the user)
Check the source code to see the variable field, a variable field is a Hidden field that has variable conditions enabled.
Field is required!
Field is required!
Subtotal
\$0.00
Field is required!
Field is required!
For debugging purposes only (to better understand how variable fields work):
Field is required!
Field is required!