Namespaces

Classes

Field
GuideButton
GuideCompositeField
GuideContainerNode
GuideDropDownList
GuideFileUpload
InstanceManager
GuideDatePicker
GuideCaptcha
GuideItemsContainer
GuideNode
GuideNumericBox
Panel
Table
GuideTermsAndConditions
GuideTextBox
Scriptable
GuideNavigationContext
GuideTelephone
GuideResultObject
GuideBridge

Mixins

AddMinMaxValidation

Namespaces

af

Events


bridgeInitializeStart

Notifies when the instance of GuideBridge is available.

Dispatched when the instance of GuideBridge is available. The GuideBridge object will be passed to the listener and further communication can be done using that object.

Note : bridgeInitializeStart event is dispatched at window

Properties:
Name Type Description
detail Object

an object containing guideBridge

Properties
Name Type Description
guideBridge GuideBridge

GuideBridge Instance

Since:
  • 6.0
Example
window.addEventListener("bridgeInitializeStart", function(evnt) {
     // get hold of the guideBridge object
     var gb = evnt.detail.guideBridge;
     //wait for the completion of adaptive forms
     gb.connect(function (){
        //this function will be called after adaptive form is initialized
     })
})

bridgeInitializeComplete

Dispatched when the initialization of Adaptive Form is complete.

Properties:
Name Type Description
payload object

payload passed to the event listener

Properties
Name Type Description
target object

instance of GuideBridge object

Since:
  • 6.0
Deprecated:
  • since 6.3 this event is deprecated. Please use connect API
Example
guideBridge.on("bridgeInitializeComplete" , function(event, payload) {
     var gb = payload.target;
     assert(gb === guideBridge)
}

elementVisibleChanged

Dispatched when visibility of any Adaptive Form component(Panel or Field) changes.

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Scriptable

Adaptive Form component whose visible property has changed.

oldText boolean

old value of the visible property

newText boolean

new value of the visible property

Since:
  • 6.0
Example
guideBridge.on("elementVisibleChanged" , function(event, payload) {
     var component = payload.target; // scripting model of the component whose visibility has changed
     var newValue = payload.newText;
     if (newValue) {
         console.log(component.name + " is visible now";
     } else {
         console.log(component.name + " is hidden now";
     }
}

elementEnableChanged

Dispatched when any Adaptive Form component is enabled/disabled, i.e. enabled property of a component changes.

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Scriptable

component whose enabled property has changed

oldText boolean

old value of the enabled property

newText boolean

new value of the enabled property

Since:
  • 6.0
Example
guideBridge.on("elementEnableChanged" , function(event, payload) {
     var component = payload.target; // scripting model of the component whose enabled property has changed
     var newValue = payload.newText;
     if (newValue) {
         console.log(component.name + " is enabled now";
     } else {
         console.log(component.name + " is disabled now";
     }
}

elementValueChanged

Dispatched when value of any Field changes.

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Field

Field whose value has changed

oldText string | number

old value of the Field

newText string | number

new value of the Field

Since:
  • 6.0
Example
guideBridge.on("elementValueChanged" , function(event, payload) {
     var component = payload.target; // Field whose value has changed
     console.log("Value of component " + component.name + " was " + payload.oldText);
     console.log("Value of component " + component.name + " is " + payload.newText);
}

elementNavigationChanged

Event to notify that the user has navigated from one Panel to another.

In layouts like Wizard or Tabbed layout, when a user navigates from one tab to another, this event is triggered

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Panel

Panel to which the user moved to

prevText string

SomExpression of the panel from which user moved

newText string

SomExpression of the panel to which user moved

Since:
  • 6.0
See:
Example
guideBridge.on("elementNavigationChanged" , function(event, payload) {
     var component = payload.target;
     console.log("old panel's SOM Expression: " + payload.oldText);
     console.log("new panel's SOM Expression: " + payload.newText);
}

elementFocusChanged

Dispatched whenever a Field/Panel gets Focus

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Panel | Field

new focused component

oldText string

SOM Expression of component that was previously in focus or null

newText string

SOM Expression of the component that is currently in focus or null

Since:
  • 6.0
See:
Example
guideBridge.on("elementFocusChanged" , function(event, payload) {
     var component = payload.target;
     console.log("old elements's SOM Expression: " + payload.oldText);
     console.log("new elements's SOM Expression: " + payload.newText);
}

elementHelpShown

Dispatched when a user looks at the help description of any Adaptive Form component(Panel or field)

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Panel | Field

component whose help is being shown

_property string

what kind of help is being shown. The value can be

  • shortDescription (if Short Description becomes visible)
  • longDescription (if Long Description becomes visible)
prevText string

empty string

newText object

object containing the help content

Properties
Name Type Description
help string

help content of the component

Since:
  • 6.0
See:
Example
guideBridge.on("elementHelpShown" , function(event, payload) {
     var component = payload.target;
     console.log("component whose help is shown " + payload.target.name);
     console.log("Help shown: " + payload._property);
     console.log("Help Content: " + payload.newText.help);
}

elementValidationStatusChanged

Dispatched when validity of a Field changes.

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Field

Field which either became valid/invalid

prevText boolean

old validation status

newText boolean

new validation status

Since:
  • 6.0
See:
Example
guideBridge.on("elementValidationStatusChanged" , function(event, payload) {
     var component = payload.target;
     if (payload.prevText) {
         console.log("component became invalid" );
     } else {
        console.log("component became valid" );
     }
}

elementButtonClicked

Dispatched when a Button component is clicked.

Developers must not modify the Form Fields inside the listener. This is mostly use to update the UI outside the Form or capture some data for analytics. If you want to modify form field value on the click of a button please use the Click Expression provided in the Forms Authoring.

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Button

Button which was clicked

Since:
  • 6.0
See:
Example
guideBridge.on("elementButtonClicked" , function(event, payload) {
     var component = payload.target; // Button which wass clicked
     console.log("Button which was clicked " + component.name);
}

validationComplete

Dispatched when the validation of all the Adaptive Form fields are completed.

Whenever the full form validations are run via the validate API, this event is triggered.

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target GuideContainerNode

root Node of the Adaptive Form

prevText boolean

result of running the validation. true if validations are successful, false otherwise

newText Array.<Field~ValidationError>

List of objects containing error messages.

Since:
  • 6.0
Example
guideBridge.on("validationComplete" , function(event, payload) {
     if (payload.prevText) {
         console.log("validation success");
     } else {
         console.log("validation failure");
         if (payload.newText.length) {
             payload.newText.forEach(function (error) {
                console.log("validation failed for " + error.som + " with message " + error.errorText);
             })
         }
     }
}

submitStart

Dispatched when the user clicks on the submit button

Users can add some pre submit code in the listener to this event.

Since:
  • 6.0
Example
guideBridge.on("submitStart" , function(event) {
   // do some pre submit processing
}

guideAutoSaveStart

Dispatched when auto save gets enabled in the Form

Adaptive Form can be configured to be saved automatically at regular intervals. This can be controlled dynamically based on the values filled in the Form. Authors can write custom scripts which can enable/disable auto save functionality dynamically

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target GuideContainerNode

root Node of the Adaptive Form

Since:
  • 6.1
See:
Example
guideBridge.on("guideAutoSaveStart" , function(event, payload) {
     console.log("Forms is now being saved as draft automatically");
}

saveStarted

Dispatched when save of adaptive form data has started

Since:
  • 6.1
Example
guideBridge.on("saveStarted" , function(event) {
     console.log("Save of Adaptive Form data is about to start");
}

saveCompleted

Dispatched when save of adaptive form data is completed

Since:
  • 6.1
Example
guideBridge.on("saveCompleted" , function(event) {
     console.log("Save of Adaptive Form data is completed");
}

elementLazyLoaded

Dispatched when an Adaptive Form fragment is lazily loaded successfully

Properties:
Name Type Description
payload object

payload containing more information about the event

Properties
Name Type Description
target Panel

Adaptive Form Fragment which is lazily loaded

Since:
  • 6.1 FP1
See:
Example
guideBridge.on("elementLazyLoaded" , function(event, payload) {
     var component = payload.target;
     console.log("Panel " + component.name + " loaded");
}