Hi Bob
I am using below code for read only fields in Load JS action
and [readonly=readonly] in field class of all the text box in my form
but to my surprise it works only for first 3 text box and not all.
please see the image attachment
I hope my problem is clear
thanks
Dhananjay
I am using below code for read only fields in Load JS action
window.addEvent('domready', function() {
var text_inputs, classes, cl, attr, el;
text_inputs = $$('.cfdiv_text input');
text_inputs.each(function(el){
classes = el.getProperty('class');
classes = classes.split(' ');
classes.each(function(cl, index){
cl = cl.trim();
if ( cl.contains('[') ) {
var attr = cl.replace(/[\[\]]/g, '');
attr = attr.split('=');
attr[1] = attr[1].replace('+', ' ');
el.setProperty(attr[0], attr[1]);
classes[index] = '';
}
});
classes = classes.join(' ');
el.setProperty('class', classes);
});
});
and [readonly=readonly] in field class of all the text box in my form
but to my surprise it works only for first 3 text box and not all.
please see the image attachment
I hope my problem is clear
thanks
Dhananjay