Javascript on forms?

I was wondering if there was a way to run javascript whenever a user inputs a certain string into a form field. A simple example I can think of is that when an interactive text box is updated by a viewer, it changes the text elsewhere in the pdf.

This might be a bit specific but its a function on Adobe and I kinda need it.