# inputEx - UneditableField Usage

## UneditableField with HTML string

To format the value of the field with an html string, use the formatValue function (schould return a string):

new inputEx.UneditableField({ name: 'date', value: new Date(), parentEl: 'container1' });

## UneditableField with DOM rendering

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 inputEx.UneditableField({ name: 'date', value: 'http://neyric.com/images/diabolo.png', visu: { visuType: 'func', func: function(value){ return inputEx.cn('img',{src:value},{border: '2px solid black'}); } }, parentEl: 'container2' });

## UneditableField with DOM rendering

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' });