# Get input type in mechanize

**URL:** <https://www.ruby-forum.com/t/get-input-type-in-mechanize/169880>\
**Category:** Ruby\
**Created:** [June 9, 2009, 10:01pm UTC](https://www.ruby-forum.com/t/get-input-type-in-mechanize/169880 "2009-06-09T22:01:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roddik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@roddik](https://www.ruby-forum.com/u/roddik)\
**Post date:** [June 9, 2009, 10:01pm UTC](https://www.ruby-forum.com/t/get-input-type-in-mechanize/169880/1 "2009-06-09T22:01:46Z")

</div>

Hello, when looping through form.fields, how can I find the type of the  
current field? Docs here  
[http://mechanize.rubyforge.org/mechanize/WWW/Mechanize/Form/Field.html](http://mechanize.rubyforge.org/mechanize/WWW/Mechanize/Form/Field.html)  
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
