How to set input field readonly?

How to set input field readonly?

There is not readonly property to input. However, you may add it using attributes array. Here is the example:

... { view:"input", id:'myinput', attributes:["readonly"], readonly:true, ...}, ...