Posts Tagged with ActiveForm

Displaying 1-3 of 3 results.
Resolved: Yii2 ActiveForm password autocomplete off chrome not working
posted by admin on June 9, 2017
I have ActiveForm in Yii2 and password section and username filled automatically and autocomplete="off" not working on Chrome

<?php $form = ActiveForm::begin([
'options' => [
//'autocomplete' => 'off'
]); ?>
. . .
<div class="row">
<div class="col-md-12">
<?= $form->field($model, 'password_change')->passwordInput(['maxlength' => true, 'autocomplete' => 'off'])->label('password') ?>
. . .
<?php ActiveForm::end(); ?>
Read more
Resolved: Yii 1: Uncaught TypeError: jQuery(...).yiiactiveform is not a function
posted by admin on October 10, 2016
In form pages I have got an error like this

Yii 1: Uncaught TypeError: jQuery(...).yiiactiveform is not a function


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


<?php Yii::app()->clientScript->registerScriptFile(app::baseUrl(false, "/js/", "jquery-1.9.1.min.js"), CClientScript::POS_HEAD);?>

app::baseUrl(false, "/js/", "jquery-1.9.1.min.js") - it is my function and class, repace it by Yii baseURL propertyRead more
Resolved: Yii Readonly Field in CActiveForm form textField
posted by admin on March 30, 2016
My row in _form.php

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
// Please note: When you enable ajax validation, make sure the corresponding
// controller action is handling ajax validation correctly.
// There is a call to performAjaxValidation() commented in generated controller code.
// See class documentation of CActiveForm for details on this.
)); ?>

<p class="note">Fields with <span class="required">*</span> are required.</p>

<?php echo $form->errorSummary($model); ?>
. . .
<div class="row">
<?php echo $form->labelEx($model,'username'); ?>
<?php echo $form->textField($model,'username',array('size'=>50,'maxlength'=>50)); ?>
<?php echo $form->error($model,'username'); ?>
. . .
<div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>

<?php $this->endWidget(); ?>

</div><!-- form -->

I want to make my username readonlyRead more