How to Create a Password Field

The Form::password() method works exactly the same as the Form::input() method except that it automatically sets the type attribute to password.

  echo Form::password('name');
  <input type="password" name="name" />

Add the second parameter to declare a value

  echo Form::password('name', 'value');
  <input type="password" name="name" value="value" />

The third parameter accepts an array of attributes

  echo Form::password('name', 'value', array('disabled'=>TRUE));
  <input type="password" name="name" value="value" disabled="1" />
how_to_create_a_password_field.txt · Last modified: 2009/10/18 00:14 by kerkness