Toggle menu

The Runtime Library

The runtime library is responsible for everything that happens in your form.

This article provides more general information about the form runtime. 

The Form Runtime Library

The runtime library is developed and maintained by the platform team here at GOSS. While you should never edit it directly, understanding its structure will help with debugging and developing field types.

It exists as three form level skeletons.

The FormRuntimeMin skeleton is the library for normal form use.

The FormRuntime skeleton is used if the debug panel is enabled in your form.

FormRuntimeDebugger provides the debug panel itself.

The runtime skeleton includes a single function called createFormRuntime, which creates an instance of the runtime. It takes several parameters which include the form name, page name and instance, runtime mode, existing form data, whether the form is displayed in iCM or on the site, tracing, auto-focus and mode.

The runtime operates in three modes, CLIENT, SERVER or SKELETON which identifies different instances of the runtime during the different phases of a form's rendering process. Different modes have different functionality - for example, the show/hide functionality of fields only make sense when the form is being displayed browser-side in CLIENT mode.

Form Runtime Modes
 

Client Mode

Client mode of the runtime library is the mode you'll have most interaction with.

When createFormRuntime is called, the following happens:

If jQuery is not loaded

  • Load jQuery using utilLoadScript
  • Load jQueryUI using utilLoadScript
  • Load jQueryUI CSS using utilLoadCSS
  • Initialise Runtime via jQuery ready

If jQuery is loaded but jQueryUI is not

  • Load jQueryUI using utilLoadScript
  • Load jQueryUI CSS using utilLoadCSS
  • Initialise Runtime via jQuery ready

Otherwise, if jQuery is already loaded

  • Initialise Runtime via jQuery ready

Once jQuery initialisation is complete, the following happens:

  • The form's custom code ready function is called
  • All registered form initialisation functions are called
  • All registered page initialisation functions are called
  • All registered field initialisation functions are called (fields that support events will call their event handlers)
  • All registered field ready functions called (most field types register jQuery events at this point)
  • If not already set, focus is set to first focusable field on form
Last modified on July 14, 2022

Share this page

Facebook icon Twitter icon email icon

Print

print icon