W
W
WEB_champion2014-12-13 18:12:15
Yii
WEB_champion, 2014-12-13 18:12:15

How to remove activity of fields (login and password) in Yii in view?

Yii has an authorization page (login) and a registration page (create).
If passwordField is present in the code, then this field and the one above become active. On the login page - this is normal, but if on the registration page - this is not adequate. Here is the code:

<?php $form=$this->beginWidget('CActiveForm', array(
  'id'=>'user-form',
)); ?>

  <p class="note">Поля с <span class="required">*</span> обязательны.</p>

  <?php echo $form->errorSummary($model); ?>

  <div class="row">
    <?php echo $form->labelEx($model,'username'); ?>
    <?php echo $form->textField($model,'username',array('size'=>35,'maxlength'=>55)); ?>
    <?php echo $form->error($model,'username'); ?>
  </div>

  <div class="row">
    <?php echo $form->labelEx($model,'Пароль'); ?>
    <?php echo $form->passwordField($model,'password',array('size'=>35,'maxlength'=>55)); ?>
    <?php echo $form->error($model,'password'); ?>
  </div>

....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Zelenin, 2014-12-13
@WEB_champion

what does "active" mean? IMHO you have some kind of plug-in in the browser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question