To format the value of the field with an html string, use the formatValue function (schould return a string):
new Y.inputEx.UneditableField({ name: 'date', value: new Date(), parentEl: 'container1' });
To render the value of the field with a DOM element (to add a behaviour), use the formatDom function (schould return a dom element):
new Y.inputEx.UneditableField({ name: 'date', value: 'http://farm2.static.flickr.com/1052/913643741_a83000f8e4.jpg', visu: { visuType: 'func', func: function(value){ return inputEx.cn('img',{src:value},{border: '2px solid black'}); } }, parentEl: 'container2' });
Display an image from the field value :
inputEx({ type: "uneditable", name: 'pagerank', value: 5, label: "Pagerank", visu: {visuType: 'func', func: function(value){ return inputEx.cn('img',{src: "http://www.page-rank-lookup.com/i/style1/pagerank"+value+".png"}) } }, parentEl: 'container3' });