OpenWGA 7.6 - OpenWGA Concepts and Features

Design and development » WebTML » Features » Forms

Input fields

Input fields of WebTML forms are defined by tag <tml:input>. Just like their equally named HTML pendants the have an attribute name which in WebTML, besides determining the name of the form field, determines the name of the item that this field will be stored to when the form gets stored to any type of document.

It also has an attribute "type" which determines the type of control that is used to display the form field. The common HTML field types type="text|password|hidden"type="select|checkbox|radio"type="textarea" and type="file" are available. Additionally there are the types type="number|date" which displays a normal text field but validate the contents to be valid numbers/dates also as the type="boolean" which displays a single checkbox and is stored to documents as actual boolean data type.

Notable differences between WebTML and HTML inputs exist on the types type="checkbox|radio". In HTML you would create a single HTML input for a each single checkbox/radion button and "glue" them together to a coherent option field by using the same names of each of them. In WebTML a single checkbox/radio input already represents a full coherent checkbox/radio field, whose single options are determined by attributes options or optionsitem.

<tml:input name="choices" type="checkbox" options="Red, Blue, Green"/>

Which puts out:

screenshot_97.png

There are three possible display modes controllable by attribute "mode that either can be set for the whole form or for each individual input. The normal mode "edit" allows normal editing of the form and its inputs. Mode "readonly" displays the input field, but in a readonly mode. Mode "view" shows no control but only the value of the field.