Data-aware controls

To create a table to display an item’s dataset use create_table method:

item.create_table(item.view_form.find(".view-table"), table_options);

To create data controls to edit fields of the of the dataset use create_inputs method:

item.create_inputs(item.edit_form.find(".edit-body"), input_options);

These methods have two parameters - container and options. The first parameter is a JQuery container in which the controls will be placed. The second - options, satisfying the way the data will be displayed. For detailed information see their API reference.

The methods are usually used in the on_view_form_created and on_edit_form_created event handlers.

All visual controls (tables, inputs, checkboxes), created by this methods are data-aware. This means that they immediately reflect any changes of the item dataset.

Sometimes it is necessary to disable this interaction. To do so use the disable_controls and enable_controls methods respectively.


Data aware controls