Anatomy of Logic Units in Aliveforms
At it's core, a logic unit is composed of conditions.
Conditions
Conditions are building blocks of logic unit. A condition can have 2 parts.
- Logic setup: input, operator, values to match
- Logic actions or script
Logic Setup
Logic setup in condition has 3 items
- Input
- Operation
- Value to Match
Actions
Actions are performed when condition in setup is matched. Depending upon logic type, there are different actions. Some actions may not work on different types of forms.
Info
Input and Operations are different depending upon type of logic (client side/server side).
Input
It can be score of screen, input of screen or script etc. Read what Inputs are available for Client Side Logics and Server Side Logics
Screen Indexes
Condition can be applied on multiple screens. Screen index can be provided either by typing or by clicking helper if form is selected. it can be:
- a number like
0
or1
or-1
- a list
0,1,3
- a special variable like
ALL
orResult
Boot Screen
In Aliveforms, index -1
is called boot index. logic added
Operation
It is the operator performed on input. Read what Operations are available for Client Side Logics and Server Side Logics
Value to Match
The format of value to match
is very important.
- If the value to match is number, write it like
10
- If the value to match is string, write it like
"Name"
- If the value to match is list, write it like
["Name", 10]
Actions
Actions are performed when condition is fulfilled.
Scripting
Aliveforms has input type for scripting. For client side, it supports JavaScript and for server side, it supports PHP.
These allow user to enter JavaScript and PHP code.
JavaScript
It can be used only on client. Select input JavaScript Read More about JavaScript API
PHP
It can be used only on server. Select input PHP Read More about PHP API