Make ui.property element readonly

Greetings!

Any suggestions for making an element of a ui.property disabled or readonly?

For example:

{
    view: 'property',
    id: 'id_report_properties',
    autoWidth: true,
    elements: [
        { label: 'Report Info', type: 'label' },
        { label: 'Name', type: 'text', id: 'name', disabled: true },
        { label: 'Info', type: 'text', id: 'info', readonly: true },
    ]
}

I’d like to use both options (depending on context).

I’ve tried the ‘Form’ approach …
http://webix.com/snippet/151c6aac

… to no avail.

Many Thanks,

Bruce

Hi,

As for ui.property, there’s nodisabled or readonly property. But you can use the onBeforeEditStart event to block editing of the particular element:

http://webix.com/snippet/79eea48e

Works great - Thanks very much for the suggestion!

Bruce