I have a field as Editable. The field is automatically populated with the value when the page is loaded. I have a condition to make filed readable using javascript. If the condition satisfied, the field changed to Read only but the value disappear, Below is the code to make field Readlonly,
var modRef =skuid.model.getModel(‘PayInv’);
var rowRef = modRef.getFirstRow();
var f = rowRef.Refunded_Amount__c;
console.log(f);
if(newD !== dateString)
{
f.readOnly = true;
}
I am wondering why the value disappear when the field changed to ReadOnly ? I would be glad if any one could help me with this.
Question
ReadOnly field using java script (value disappear when field changed to ReadOnly)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.