How I can fill a text field with the condition of another field?