Changing ReadOnly field value dynamically

Changing ReadOnly field value dynamically

BernardoLimaBernardoLima Posts: 20Questions: 0Answers: 0
edited March 2013 in Editor
How it's possible to make a ReadOnly field value be the result of other two fields?
Like

A- Field #1
B - Field #2
C - Field#3 -< ReadOnly

C value = A multiplied by B

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Based on user input in A and B? If you want it live (i.e. while they type), you'd use the `node` API method ( http://editor.datatables.net/docs/current/Editor.html#node ) to attach an event listener (keyup probably) to field #1 and #2's input elements, and then the `set` method ( http://editor.datatables.net/docs/current/Editor.html#set ) to set the resulting value from the calculation.

    Allan
This discussion has been closed.