TbHtml::activePasswordField PHP Method

activePasswordField() public static method

Generates a password field input for a model attribute.
See also: self::activeTextInputField
public static activePasswordField ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model.
$attribute string the attribute.
$htmlOptions array additional HTML attributes.
return string the generated input field.
    public static function activePasswordField($model, $attribute, $htmlOptions = array())
    {
        return self::activeTextInputField('password', $model, $attribute, $htmlOptions);
    }

Usage Example

Example #1
0
	
	<div class="form-control input-lg" style="width: 45%;">
		<?php 
echo TbHtml::activeLabelEx($model, 'username');
?>
		<?php 
echo TbHtml::activeTextField($model, 'username');
?>
	</div><br/>
	
	<div class="form-control input-lg" style="width: 45%;">
		<?php 
echo TbHtml::activeLabelEx($model, 'password');
?>
		<?php 
echo TbHtml::activePasswordField($model, 'password');
?>
	</div><br/>
	
	<div style="width: 45%;">
		<p class="hint">
		<?php 
echo TbHtml::link(UserModule::t("Register"), Yii::app()->getModule('user')->registrationUrl);
?>
<br/><?php 
echo TbHtml::link(UserModule::t("Lost Password?"), Yii::app()->getModule('user')->recoveryUrl);
?>
		</p>
	</div>
	<!--
	<div class="row-fluid rememberMe">
All Usage Examples Of TbHtml::activePasswordField
TbHtml