Calculations in Aliveforms
Learn about calculations in Aliveforms
Calculations are very useful and important element in Aliveforms. In Aliveforms, calculations can be done on
- Weight (score points) of screens if form type is Analytical.
- Variables
- Hidden Inputs
- Numeric Values
Read about Variables in Aliveforms
Syntax
In form title, calculation are executed in [/ /]
block.
Examples
We have variable PER_UNIT_COST defined. In Form, we have input of type number to capture number of units on index 2.
[/ [[VAR.PER_UNIT_COST]] * [[SCREEN.2]] /]
Note that we have maintained [[VAR.]]
and [[SCREEN.]]
syntax.
If we want to use intermediate value
[/ 19 * [[SCREEN.2]] /]
We can also use score of screen in Analytical Form
. For example, we have multiple choice screen with items. Allow multiple is on, so user can select multiple choices.
[/ [[VAR.PER_UNIT_COST]] * [[SCORE.2]] /]
We can also use calculations on Hidden Inputs. For example, we have hidden input after welcome screen. [/ Date.now() /]
. Before the submit screen. we can add another hidden input [/ Date.now() - [[SCREEN.1]] /]
. This way, we obtained total time taken by user to complete the form.