If you want everything else in that section to remain read-only except for the single line field, try using the following function. I created it to dynamically change the read only state of a form element.
function setReadOnly(e,t) {
if(t){
// Set input element to read-only
e.attr({'readonly': 'readonly', 'backend-readonly': 'True'});
} else {
// Remove readonly from input element
e.removeAttr('readonly backend-readonly disabled');
}
}
just pass the form element and a true/false value. For example,
setReadOnly($('#Field1 input[type="text"]'),false);
Also, after setting a value with javascript I tend to trigger the change event for good measure since it seems to be necessary for rules and such to trigger. For example, $('field).val('test).change();