Client-side scripts allow the system to run JS scripts in the browser when the client-side events happen, for example:
- form loading;
- form submitting;
- field value changing.
Client-side scripts are used to configure forms, form fields, and field values while the client uses the form. Their abilities:
- make the field hidden or visible;
- make the field read-only;
- make the field mandatory or non-mandatory;
- set the value in one field based on the value in another field;
- change parameters in a Choice list;
- show a message basing on the field value.
The client-side script form configuration
The client script can be configured via the SIMPLE administrative interface.
You must have admin privileges to do this.
To configure a script, please navigate to System Definition -> Client Script. In the table below you can find information about the fields.
Name | Description |
---|---|
Name | Client-side script name |
Table | A table. The script will be executed on its form, |
Type | The script type:
|
Column | The changes in this field will be the triggers to start the onChange script. |
Description | Detailed description of script actions. |
Active | If TRUE then the script will work; otherwise it will not. |
Inherited | If TRUE then the script will be applied not only for the table specified in the Table field but also for all its child tables. |
Script | This field contains the client-side script. |
Sys updated by | This field contains information about the person who did the last update of the script. This field is filled automatically and always read-only. |
Client API
In the client-side scripts, you can use methods that are provided by client API SimpleForm (description is here).