Yii2 module for including contact forms
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist daxslab/yii2-contactform-module "*"
or add
"daxslab/yii2-contactform-module": "*"
to the require section of your composer.json
file.
Setup the module on config file
'modules' => [
//...
'contactForm' => [
'class' => 'daxslab\contactform\Module',
'viewPath' => '@app/views/contactForm', //you can configure the view path in order to use custom views
],
//...
],
You can embed the form on any view using Yii::$app->runAction('/contactForm/default/contact', ['renderPartial' => true])
.
Comments