Most of the useful applications not only present data but also accept inputs from their users. And when we think of having a way to accept inputs from the user, send them to the server for further processing, and allow the user to modify them, we think of forms and form fields. If our application requires users to enter some information, we go about using the HTML form fields, such as <input>
and <select>
, and wrap them inside a <form>
element. Sencha Touch uses these tags and provides convenient JavaScript classes to us to work with the form and its fields. It provides classes, such as Url
, Toggle
, Select
, and Text
. Each of these classes provides the properties to initialize the field and handle the events and utility methods to manipulate the behavior and the values of the field. On the other side, the form takes care of the rendering of the fields and also handles the data submission.
Each field can be created using the JavaScript Object Notation (JSON –...