password_field

password_field(name = "", value = nil, size = 40, maxlength = nil)
Instance Public methods

Generate a Password Input element as a string.

name is the name of the input field. value is its default value. size is the size of the input field display. maxlength is the maximum length of the inputted password.

Alternatively, attributes can be specified as a hash.

password_field("name")
  # <INPUT TYPE="password" NAME="name" SIZE="40">

password_field("name", "value")
  # <INPUT TYPE="password" NAME="name" VALUE="value" SIZE="40">

password_field("password", "value", 80, 200)
  # <INPUT TYPE="password" NAME="name" VALUE="value" SIZE="80" MAXLENGTH="200">

password_field("NAME" => "name", "VALUE" => "value")
  # <INPUT TYPE="password" NAME="name" VALUE="value">
doc_ruby_on_rails
2015-03-31 21:55:50
Comments
Leave a Comment

Please login to continue.