Change content of a field based on the value of another field

You can set it in custom script in js.

Please refer to below links,