Feedback (Contact Us Form)



Modules Feedback (Contact Us Form) have been develop for Dynaweb4 to enable public user to send feedback from the frontpage. This module also have function to managing Person In-Charge (PIC) and function to reply user feedback.

Modules Features

  • Enable public user to send feedback (complaints, messages, inquiry, etc) from the frontpage
  • Have function to managing Person In-Charge (PIC)
  • Easily reply user feedback (reply message will automatically send to user email)

Installation Instruction

  1. Upload ZIP file at menu Backend > Module
  2. Go to common\config\main-local.php and update the email settings (username and password) 
    'mailer' => [
                'class' => 'yii\swiftmailer\Mailer',
                'viewPath' => '@common/mail',
                'useFileTransport' => false,
                'transport' => [
                    'class' => 'Swift_SmtpTransport',
                    'host' => 'smtp.gmail.com',
                    'username' => 'secret@gmail.com',//insert your email address here
                    'password' => 'secret',//insert your email password here
                    'port' => '587',
                    'encryption' => 'tls',
                ],
            ],
  3. Manage (add & update) Person In-Charge at http://yourdomain.com/admin/contactForm/contact-form-setup/index
  4. You can use below source code at your frontpage for the public user to send feedback (you can test to send feedback at http://yourdomain.com/admin/contactForm/contact-form-messages/send)
    <div><input type="text" id="name" name="username" placeholder="Name*"></div>
    <div><input type="text" id="email" name="email" placeholder="Email Address*"></div>
    <div><textarea id="message" name="message" placeholder="Your message*"></textarea></div>
    <button type="button" onclick="sendmessage()">Send</button>
    <script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
    <script>
      function sendmessage(){
        var name = $("#name").val();
        var email_address = $("#email").val();
        var message = $("#message").val();
        if(name!=="" && email_address!=="" && message!==""){
          $.ajax({
           url: "create?name="+name+"&email_address="+email_address+"&message="+message, 
           success: function(result){
             if(result==="error")
               alert("Failed to send. Please try again");
             else if(result==="success")
               alert("Sucessfully send. You will receive an email when admin reply your message");
            }
          });
       }else{
         alert("Complete the form");
        }
       }
    </script>
  5. When the public user send feedback from front page, admin can manage the feedback at http://yourdomain.com/admin/contactForm/contact-form-messages/index
Download Now
Category
Backend
Total Downloads
0 downloads
Last Update
03 April 2021
Created on
03 April 2021
Develop by
Anne
Compatible With
Dynaweb4 V3.0.1
List of all releases

Current version
Version 1.0 (Release on 03 April 2021)
First version of modules
Download