moonlandsoft/autogrow

The Jquery autogrow extension for texarea in yii framework

Installs: 364

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

1.0.0 2015-01-24 04:13 UTC

This package is not auto-updated.

Last update: 2024-12-21 17:59:02 UTC


README

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']]); ?>