getVal for text input