Handle class option on text fields