Sometimes, a programmer needs to identify if the form state is on UPDATE, CREATE,etc. To know this, we have to get the state of the form using its form type. Please see the code below
getFromType() function returns integer value for different Form states
0 - undefined
1 - Create
2 - Update
3 - Read Only
4 - Disabled
5 - Quick Create (Deprecated)
6 - Bulk Edit