add condition to textbox