module CGI::HtmlExtension

def hidden(name = "", value = nil)

#
hidden("NAME" => "name", "VALUE" => "reset", "ID" => "foo")

#
hidden("name", "value")

#
hidden("name")

Alternatively, the attributes can be specified as a hash.

+name+ and +value+.
The attributes of the element can be specified as two arguments,

Generate a Hidden Input element as a string.
def hidden(name = "", value = nil)
  attributes = if name.kind_of?(String)
                 { "TYPE" => "hidden", "NAME" => name, "VALUE" => value }
               else
                 name["TYPE"] = "hidden"
                 name
               end
  input(attributes)
end