Skip to content

Latest commit

 

History

History
executable file
·
43 lines (29 loc) · 886 Bytes

README.md

File metadata and controls

executable file
·
43 lines (29 loc) · 886 Bytes

jQuery Autogrow

The Jquery autogrow extension for texarea in yii framework

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist moonlandsoft/autogrow "*"

or add

"moonlandsoft/autogrow": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= Autogrow::widget(['selector' => '.text-area-grow']); ?>

or use this with jquery function call :

<?= Autogrow::widget(['selector' => '.text-area-grow', 'functionName' => 'makeTextAutogrow']); ?>

For from widget, you can use code below :

<?= $form->field($model, 'attribute')->widget(AutogrowInput::className(), ['options' => ['class' => 'form-control']]); ?>