RTFM. Readonly is a type of field not an attribute. You will need to use FormAPI to do what you want to do.
Hi Nipper,Thanks for the reply. Yeh I am aware of setting the item to readonly through formAPI. But my requirement is in such a way that it needs to be set through the perl script (inline). Is there a way we can achieve that functionality without using a FormApI?-Amaresh
Can you not have a JS include in your inline Perl?
IWDatacapture.getItem('/Test/Test').setReadOnly(true);