Customise Forms with JavaScript

For more experienced developers, Digitise Forms allows you to fully customise your forms' operations by adding your own custom JavaScript. When creating your forms in Form Studio you can attach custom JavaScript to Events such as a button click, an Element's value changing or a page loading. You can also use it to validate the information entered into the form, to perform custom error handling and to control the display and availability of Elements, e.g. to hide and show Elements based on values entered into other Elements.

You may also need to access the custom JavaScript if you need to modify one of the predefined actions assigned to an Event, such as to specify a page to move to when using the Move to page action.

 

 

To edit a JavaScript function, whether it is a predefined action, validation or custom function you can either use the Form Studio's in-built Script Editor or another suitable text editor, such as Notepad++.

The Visible and Disabled properties' JavaScript expressions are edited in the Expression Builder pop-up dialog available from the Elements Appearance properties.

For more information about entering and editing JavaScript functions and expressions refer to the following additional topics:

Edit Custom JavaScript

The Script Editor

Edit Custom JavaScript in an External Editor

Writing Scripts

Function Parameters

Accessible Properties

List of Functions

Advanced Scripting for JavaScript Developers

 

If you are editing predefined actions within an Event property and you are not familiar with JavaScript, you will find instructions under the relevant action in the List of Functions.