class WWW::Mechanize::Form

def has_field?(field_name)

Returns whether or not the form contains a field with +field_name+
def has_field?(field_name)
  ! fields.find { |f| f.name.eql? field_name }.nil?
end