diff --git a/app/protected/controllers/SiteController.php b/app/protected/controllers/SiteController.php index 33a87c9..7e6bb15 100644 --- a/app/protected/controllers/SiteController.php +++ b/app/protected/controllers/SiteController.php @@ -33,7 +33,7 @@ class SiteController extends Controller { $model = new ContactForm; if ($this->populate($_POST, $model) && $model->contact(Yii::$app->params['adminEmail'])) { - Yii::$app->session->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.'); + Yii::$app->session->setFlash('contactFormSubmitted'); Yii::$app->response->refresh(); } else { echo $this->render('contact', array( diff --git a/app/protected/views/site/contact.php b/app/protected/views/site/contact.php index 726498e..246570d 100644 --- a/app/protected/views/site/contact.php +++ b/app/protected/views/site/contact.php @@ -9,7 +9,15 @@ $this->title = 'Contact'; ?>
Please fill out the following fields:
+session->hasFlash('contactFormSubmitted')): ?> ++ If you have business inquiries or other questions, please fill out the following form to contact us. Thank you. +
beginWidget('yii\widgets\ActiveForm', array( 'options' => array('class' => 'form-horizontal'), @@ -19,9 +27,7 @@ $this->title = 'Contact'; field($model, 'email')->textInput(); ?> field($model, 'subject')->textInput(); ?> field($model, 'body')->textArea(array('rows' => 6)); ?> -