OpenWGA 7.6 - TMLScript reference

WGA
Method :

createForm(formInfo)

On object WGA
Usage Creates a new TMLForm object as configured by a FormInfo object
Description While TMLForm objects are mostly created implicitly by the WebTML tag <tml:form> this method provides the possibility to create a form directly from TMLScript. This may be useful if you directly want to initialize the form with field values in TMLScript.

The created form object can then be used by a subsequent <tml:form> tag to offer it for editing. For that to work the id of the form tag must match the ID of the created form object.

For backward compatibility there still is a method "createForm()" available on TMLContext whose use is discouraged since OpenWGA 5.3.

Parameters formInfo (FormInfo object):
An information object holding settings about the TMLForm object to build. Create one via WGA.createFormInfo()
Return value A new TMLForm object
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions