This Titanium CommonJS module provides a simple way to create data entry forms with consistent style and functionality. Forms are built from an array of form section objects which define field types and values.
A form section is a group of related form fields.
property | type | req'd? | description |
---|---|---|---|
title | String | no | A title to display above the form section |
fields | Object[] | no | An array of field objects describing the form fields in this section |
A form field is a single input control and optional label.
property | type | req'd? | description |
---|---|---|---|
key | String | yes | The name of the input value for this field. This string is provided in the change event along with the updated field value. |
label | String | no | A string describing the field which will be displayed to the left of the field. |
formatter | Function | no | Function which converts the model value to a string for display. The function should take the "native" data format as a parameter and return a string. |
options | Object | no | An object containing properties that override the default propeties of the form input control. |
The data model is a dictionary that is passed to the populate() method of the FormView to place data into the form. The dictionary values can be strings, numbers, or functions.