OpenWGA 7.7 - TMLScript reference
Object:
FormInfo
Description |
FormInfo is an object holding information to create a TMLForm object from TMLScript. A FormInfo object contains all settings that normally are done on a <tml:form> tag when defining a WebTML form from WebTML. Use this object on method WGA.createForm() to actually build a WebTML form from the settings. It is possible to first build a WebTML form from TMLScript using this object, initialize it somehow directly in TMLScript and then display it using a <tml:form> tag offering it to the user for editing. You just need to specify the same ID on the form tag that you used to create the FormInfo object. |
||||||||||||||||||
Retrieval |
tmlform.formInfo of existing forms WGA.createFormInfo() or Design.createFormInfo() to create a new FormInfo object |
||||||||||||||||||
Allowed in script types |
|
||||||||||||||||||
Properties and methods |
|
||||||||||||||||||
Examples |
An example how to create a TMLForm object from TMLScript. First a FormInfo object is created and configured. After that the TMLForm object is created on base of the FormInfo object. Some field initialisation might be directly done after that in TMLScript: var formInfo = WGA.createFormInfo("formid", false, true); After that the created form can be picked up by a <tml:form> tag by just using the same ID again. Note however that for regular (non-persistent) forms this must be done in the same request as the TMLForm creation as forms normally do not persist accross multiple requests if they are not submitted: <tml:form id="formid"> |