asbsoft/yii2module-contactform_3_170124

Simple Yii2 contact form. Template of standard module collected in vendor place.

3.12.4 2018-01-31 16:01 UTC

This package is not auto-updated.

Last update: 2024-04-23 02:36:20 UTC


README

This is demo template of module collected in common vendor place.

You can add this module to your system (advanced Yii2-template) by separate adding BackendModule and FrontendModule. In basic Yii2-template you have to add this modules together.

Otherwise you can use single CommonModule for this purpose.

In your application configs must be some tunes:

  • config/params.php: 'adminPath' => 'admin', // non-empty string for BASIC Yii application template 'adminPath' => '', // empty string for backend of ADVANCED Yii application template
  • in bootstrap: AdminController::$adminPath = Yii::$app->params['adminPath']; Default is AdminController::$adminPath = 'admin'.

Now only one such module or its' successor can add to system.

Contact form can be used inside other web page by AJAX, for example:

      <div id="<?= $contactFormTagId ?>">
          <?= Yii::$app->runAction("/{$contactsModuleUid}/main/form", [
              'ajaxReceiver' => $contactFormTagId,
          ]) ?>
      </div>