Get input type in mechanize

Hello, when looping through form.fields, how can I find the type of the
current field? Docs here
say “following input tags found in a form: text, password, hidden, int,
textarea” and I want to know exactly whether input is a text, hidden or
textarea field. How can I do that? Thanks