Update form field value dynamically

Viewed 19

I need to update the form field value using javascript as below:

var frmRec = App.frmEdit.getRecord();
frmRec.set('CallingName', 'Tesing calling name');

When I check the form data via the console, I can see the calling name field is updated:

console.log('rec: ', App.frmEdit.getRecord());

But the textfield in the form is not updated, old values still show up in the form. How can I "refresh" the value of the TextField in this case ?

Thanks in advance

1 Answers

If your data binding is setup correctly there is no need to refresh anything. The Extjs form supports two-way binding change to the record would be reflected in the text field and any change to the text field would be updated in the record.

two way binding example

The kitchen sink examples have lots of data binding examples.

Related