PHPackages                             mrstroz/yii2-wavecms-form - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. mrstroz/yii2-wavecms-form

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

mrstroz/yii2-wavecms-form
=========================

Form module for WaveCMS

0.2.3(6y ago)0217↓100%1MITPHPPHP &gt;=5.6.0

Since Nov 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mrstroz/yii2-wavecms-form)[ Packagist](https://packagist.org/packages/mrstroz/yii2-wavecms-form)[ RSS](/packages/mrstroz-yii2-wavecms-form/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (7)Versions (7)Used By (1)

yii2-wavecms-form
=================

[](#yii2-wavecms-form)

**Form module for [Yii 2 WaveCMS](https://github.com/mrstroz/yii2-wavecms).**

Please do all install steps first from [Yii 2 WaveCMS](https://github.com/mrstroz/yii2-wavecms).

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Run

```
composer require --prefer-source "mrstroz/yii2-wavecms-form" "~0.2.1"

```

or add

```
"mrstroz/yii2-wavecms-form": "~0.2.1"

```

to the require section of your `composer.json` file.

Required
--------

[](#required)

1. Update `backend/config/main.php` (Yii2 advanced template)

```
'modules' => [
    // ...
    'wavecms-form' => [
        'class' => 'mrstroz\wavecms\form\Module',
        /*
        * Override classes
        'classMap' => [
            'Form' => 'common\models\Form',
        ]
        */
    ],
],
```

Form views can be overwritten by backend [themes](http://www.yiiframework.com/doc-2.0/guide-output-theming.html);

2. Add the `migrationPath` in `console/config/main.php` and run `yii migrate`:

```
// Add migrationPaths to console config:
'controllerMap' => [
    'migrate' => [
        'class' => 'yii\console\controllers\MigrateController',
        'migrationPath' => [
            '@vendor/mrstroz/yii2-wavecms-form/migrations'
        ],
    ],
],
```

Or run migrates directly

```
yii migrate/up --migrationPath=@vendor/mrstroz/yii2-wavecms-form/migrations

```

3. Add `reCaptcha` component to `common/config/main-local.php`

```
'components' => [
    'reCaptcha' => [
        'name' => 'reCaptcha',
        'class' => 'himiklab\yii2\recaptcha\ReCaptcha',
        'siteKey' => 'your siteKey',
        'secret' => 'your secret key',
    ],
    // ...
]
```

Usage in frontend
-----------------

[](#usage-in-frontend)

1. **Controller**

```
