The client script can be configured via the SimpleOne administrative interface.
Required role: admin.
To configure a script, please complete the steps below:
Navigate to System Definition->Client Script;
Click New, fill in the fields and click Save.
Client script form fields
Name
Description
Name
Client-side script name.
Table
A table on which form the script will be executed.
Type
The script type:
onLoad – it starts when the system displays the form for the first time before users will enter data. Generally, onLoad scripts perform manipulations on the client-side with the current form or set default record values;
onChange – it starts when the specified field in the form is changed;
onSubmit – this client-side script can cancel form submitting by returning false;
onCellEdit - this client-side script starts at the moment when some cell is to edit.
Views
Specify a form view on which the client script should be run. You can specify more than one view. If no view is specified, then this client script will be executed on all the views if there are any.
Condition
Specify a trigger condition for this client script that must be met so that the script runs. Use the Condition Builder to build complex AND/OR filters.
Conditions work jointly with values from the Type field; they are applicable only for the onLoad or onChange client-side scripts.
Description
A detailed description of script actions.
Messages
Enter a message you want to show to a user when a client script is performed.
Active
When set to TRUE, the script is active; otherwise, it is not.
Inherited
When set to TRUE, the script will be applied not only for the table specified in the Table field but also for all its child tables.
Order
Defines the order of the client script execution. If there are several client scripts, they will be executed in the ascending order.