I don’t think there’s a super-easy way. But you might want to try a client-side solution like this:
William demonstrated how to create a custom head contribution plugin (which could be added to a document type namespace editor:template definition) to add your custom javascript library. [1]
You can set custom CSS class names for a field in the document type editor.
Your custom Javascript can possibly do some magic. e.g, add onchange event handler to HTML elements having a specific CSS class to read those and update another HTML element having another specific CSS class.