Events
Events are user interaction points in the Civic Platform where the user will trigger a specific event. For example, pressing a button, adding a row to a table, submitting a transaction through Construct API, or other action are all event points in the Civic Platform. These events start an action or actions which act on the data in the Civic Platform by adding, modifying, or deleting information.
Example: When you fill out the form to create a new record and then select the Submit button, you trigger an event point which usually has two (but occasionally only one) events associated with the event point.
Events are usually either a BEFORE event type or an AFTER event type.
BEFORE event type
A BEFORE event type is used by a script to validate the data before it is committed, or saved, to the database. The BEFORE event allows a script to check to make sure the data is valid and complete before it is saved and, if it isn’t complete or valid, stops the Civic Platform from committing or saving the data to the database.
AFTER event type
An AFTER event type is used by a script to perform tasks automatically after the data is committed, or saved, to the database. These tasks or automations are consistently executed to save the user time and to make sure the tasks are always performed against the specific object or objects.
