I have a following warning and am not sure if I can ignore it, or why or how to fix it.
The property readOnly is undefined for the type RuntimeComponent
Appears on line “elements[allNames*].readOnly = false” only* Taken from Solution Sample originally. Example
var allNames = elements.allnames*
for ( var i = 0 ; i < allNames.length ; i++ )*
{*
//work on fields only - starting with name “fld_”* if(allNames*.indexOf(‘fld_’) >= 0){
_ //if it’s a field - then change color and make editable*_ _ elements[allNames*].bgcolor = ‘#feffe4’ elements[allNames].enabled = true* elements[allNames*].readOnly = false* * }* Thanks Mark_
Didn’t find in Sample Solutions code: elements[allNames_].readOnly = false. I found, instead, elements[allNames*][‘readOnly’] = false, which works fine.*_
After checking I found the following:
All my fields were real fields so not the problem in this case. I tested each with elements.fld_linbcc.readOnly = true and got no warning.
Also ran the output and got just text and html areas.
I am unable to do the readOnly at the form level as am switching fields based on different conditions.
mmuntean’s solution is the best option. A quick replace fixed all the occurrences and now all warnings have gone away