zakharov-andrew / yii2-survey-forms-widget
Yii2 Survey Form widget
Package info
github.com/ZakharovAndrew/yii2-survey-forms-widget
Type:yii2-extension
pkg:composer/zakharov-andrew/yii2-survey-forms-widget
v0.0.8
2022-11-17 12:30 UTC
Requires
- php: >=7.0
- zakharov-andrew/survey-forms: ^0.1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Survey module for Yii2 application. Use SurveyForms.js javascript library
Installation
The preferred way to install this extension is through composer.
Either run
$ composer require zakharov-andrew/yii2-survey-forms-widget
or add
"zakharov-andrew/yii2-survey-forms-widget": "*"
to the require section of your composer.json file.
Usage
use surveyforms\survey\Survey; echo SurveyWidget::widget([ 'id' => 'survey-forms', 'title' => 'First Survey Test', 'description' => 'Simple description. SurveyForms.js demo', 'background_color' => '#f7fafc', 'question' => [ (object)[ 'title' => 'Test Title 1', 'required' => true, 'options' => ['one', 'two', 'zero'] ], (object)[ 'title' => 'Test Title 2', 'required' => false, 'options' => ['1', '2', '3'], 'score' => 5 ], (object)[ 'title' => 'Test Title 3', 'type' => 'select', 'required' => true, 'options' => ['option 1', 'option 2', 'option 3'], 'score' => 5 ], ] ]);
License
yii2-survey-forms-widget it is available under a MIT License. Detailed information can be found in the LICENSE.md.