Skip to content

UI Component - Dependencies

The Component Library Documents and Component External Library Documents fields allow you to add reference libraries and modules to the UI Component to extend its capabilities.

Component Library Documents

Component Library code referenced by a UI Component must be specified before it can be used. This also includes any libraries that support the libraries that are referenced by the UI Component. The Component Library Documents field provides a list of available libraries to choose from. Add these to the UI Component as required.

As an example, the UI Component sc-date-time makes use of code in:

  • sclUtilDate to validate and format dates
  • sclUtilDocument to identify if the form is in "new" mode in order to decide whether to apply defaults
  • sclDeviceDetect to identify what device is being used in order to determine how best to present the component

Tip: Refer to section Component Libraries for a list of available Component libraries. You can also create your own Component Libraries, using the Component Library Editor template (94505f30-68ea-11e6-805f-e19523cf1fb8).

Component External Library Documents

External libraries referenced by the UI Component must be specified before they can be used. This also includes any external libraries used by any Component Libraries linked to the UI Component. The Component External Library Documents field provides a list of available external libraries to choose from. Add these to the UI Component as required.

As an example, the UI Component sc-signature is built upon a JQuery plugin named jSignature. It required the following external libraries to be linked with it:

  • jSignatureCss

  • jSignatureMin

  • jSignatureCompressorBase30

  • jSignatureCompressorSVG

  • jSignatureUndoButton

  • jSignatureSignHere

The list of external libraries available in your Formbird environment may be extended. If there is an external library you wish to utilize that is not currently available for selection, please contact your Formbird administrator to request / perform this setup in your environment.

Tip: It is possible to lazy load an external library from within component code. Adding it via the Component External Library Documents field is the preferable option in situations where the external library is always required. In contrast, lazy loading may be of benefit if the external library is seldom accessed or is interchangeable based on configurable options. In either case, the external library still needs to be made accessible by your Formbird administrator. See Component Development - Utilizing External Libraries for further details.