New version 0.9 has been released! Jun 16, 2015
×

Feedback module

Description

Feedback module helps you to create feedback form on frontend.


Include

use yii\easyii\modules\feedback\api\Feedback;


Public functions

string Feedback::form()
Returns fully worked standalone html form.
array Feedback::create( $attributes )
If you using your own form, this function will be useful for manual saving feedback's.
$attributes array
  • name (string) *
  • email (string) *
  • text (string) *
  • phone (string)
  • title (string)
  • g-recaptcha-response (string) - needed, if "enableCaptcha" module setting is true.
* - required attributes

examples

Feedback::create([ 'name' => 'Tester', 'email' => 'example@site.com', 'text' => 'My big feedback to you' ]);
Array
(
    [result] => success
)
IF new feedback successfully saved.
Array
(
    [result] => error
    [error] => Array
        (
            [0] => array
            [1] => of
            [2] => errors
        )

)
IF new feedback saving failed.