One field is changed on the form when the other field changes

One field is changed on the form when the other field changes

I am developing  a form , where the change of value in one field will trigger the change of value in another field, in real time, as the user is entering data into a field and then tab to another field..... how can a deluge script be written to reflect this?