24/01
2015
The Jquery autogrow extension for texarea in yii framework
The Jquery autogrow extension for texarea in yii framework, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist moonlandsoft/autogrow "*"
or add, (*4)
"moonlandsoft/autogrow": "*"
to the require section of your composer.json
file., (*5)
Once the extension is installed, simply use it in your code by :, (*6)
<?= Autogrow::widget(['selector' => '.text-area-grow']); ?>
or use this with jquery function call :, (*7)
<?= Autogrow::widget(['selector' => '.text-area-grow', 'functionName' => 'makeTextAutogrow']); ?>
For from widget, you can use code below :, (*8)
<?= $form->field($model, 'attribute')->widget(AutogrowInput::className(), ['options' => ['class' => 'form-control']]); ?>