added the functionallity that when a text field is active and empty  and then loses focus, the button text changes to default and the switch is set to false