OpenWGA 7.10 - TMLScript reference
This object represents a WebTML form which either has been created by a <tml:form> tag or in TMLScript via WGA.createForm(). It offers various functionalities to read and modify the data that is stored on the form and transmit it to any data sink.
Use methods tmlform.field() to read and write single field values. As a shortform syntax you can also use the name of a field as property of the TMLForm object to read its value.
As WebTML form fields can also contain multiple values you can use tmlform.fieldList() to read a list of values. Use tmlform.setField() to create new or modify existing fields. Use tmlform.removeField() to remove fields from the form.
WebTML forms can also store uploaded files. Use methods like tmlform.fileNames, tmlform.getFile() or tmlform.getFileText() to read and use uploaded file data.
WebTML forms may take the values of their fields from different sources, depending on tmlform.source(). Use the method tmlform.store() to transfer all field data back to the data source of the form.
There are also various methods to influence the validation functionality of WebTML forms. Use tmlform.validate() to manually trigger a validation. Otherwise validation is executed automatically when using one of the tmlform.storeIn.. methods. Use tmlform.getInvalidFields(), tmlform.getMessage() and tmlform.hasMessage() to read the validation status of the form.
All methods of this object can be called case insensitive though we recommend to use the case that is documented here.
Create via WebTML tag <tml:form> or TMLScript method WGA.createForm()
Retrieve via this.tmlform or this.tmlformByID()
|Allowed in script types||
|Properties and methods||
Simple read access to a TMLForm field, once in full, once in shortform syntax. Both work the same way:
var x = tmlform.field("username");