elements

an array of property items

object elements;

Example

{
    view:"property",
    elements:[
        { label:"Layout" },
        { label:"Width", type:"text", id:"width"},
        { label:"Data type", type:"toggle", options:["json","xml"], id:"type"},
        { label:"Color front", type:"popup", popup:"myColorF", id:"colorF" }
    ]
}

Related samples

Details

Each property element has:

  • label - the text label displayed on the left. If there are no other properties in the object, this element becomes a header;
  • type - the editor that is opened on clicking the element;
  • id - the ID of the element. Used by the setValues and getValues methods to place values into the dedicated cells;
  • options - the collection of options (for select editors only), read more;
  • editor controls (depends on the type property). Read more about editor types.

You can choose among these editor types:

  • color - for colors, colorboard appears on editing;
  • text - for text values;
  • password - for passwords. Masks symbols in the input;
  • inline-text - customizable text editor (you can set dimensions and type);
  • select - for selection among several text values;
  • combo - for filtering popup list;
  • richselect - non-editable combo editor;
  • multiselect - for selecting multiple options;
  • checkbox - for two-state values;
  • inline-checkbox - customizable checkbox (you can define a template for states);
  • date - for picking a date;
  • toggle (a two-state button) - for two-state values;
  • popup - a popup window.

The elements with the label type get header CSS. If there's no type, the element is non-styled and non-editable.

See also
Back to top