PHP code example of egor260890 / yii2-feedback-module
1. Go to this page and download the library: Download egor260890/yii2-feedback-module library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
egor260890 / yii2-feedback-module example snippets
<?=\egor260890\feedback\widgets\FeedbackForm::widget([
'id'=>'feed',
'template'=>'{name}{tel}{email}{company_name}{message}{button}',
'rules'=>function(){
return [
[['tel'], 'tel'=>[
'label'=>'custom label'
],
'button'=>[
'label'=>'custom button name',
'class'=>'btn btn-warning'
]
],
'formConfig'=>[
'enableAjaxValidation' => true,
'enableClientValidation' => true,
]
])
php composer.phar