1. Home
  2. Docs
  3. eLan – Moodle Theme Documentation
  4. FAQs
  5. How to setup contact form?

How to setup contact form?

Here is the contact form HTML code:

<div class="contact-form">
    <span class="sub-title">SEND MESSAGE</span>
    <h2>Lets Provide Us a Message & Contact Us</h2>
    <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy liquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolo lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy liquyam erat,
        sed diam voluptua.</p>
    <form id="contactForm">
        <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-6">
                <div class="form-group">
                    <input type="text" name="name" class="form-control" id="name" required="" data-error="Please enter your name" placeholder="Name">
                    <div class="help-block with-errors"></div>
                </div>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6">
                <div class="form-group">
                    <input type="email" name="email" class="form-control" id="email" required="" data-error="Please enter your email" placeholder="Email Address">
                    <div class="help-block with-errors"></div>
                </div>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6">
                <div class="form-group">
                    <input type="text" name="phone_number" class="form-control" id="phone_number" required="" data-error="Please enter your phone number" placeholder="Phone Number">
                    <div class="help-block with-errors"></div>
                </div>
            </div>
            <div class="col-lg-6 col-md-6 col-sm-6">
                <div class="form-group">
                    <input type="text" name="msg_subject" class="form-control" id="msg_subject" placeholder="Subject" required="" data-error="Please enter your subject">
                    <div class="help-block with-errors"></div>
                </div>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12">
                <div class="form-group">
                    <textarea name="message" id="message" class="form-control" cols="30" rows="6" required="" data-error="Please enter your message" placeholder="Message..."></textarea>
                    <div class="help-block with-errors"></div>
                </div>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12">
                <div class="form-check">
                    <input type="checkbox" class="form-check-input" id="checkme">
                    <label class="form-check-label" for="checkme">
                        Accept <a href="https://elan.envytheme.com/mod/page/view.php?id=10">Terms of Services</a> and <a href="https://elan.envytheme.com/mod/page/view.php?id=9">Privacy Policy</a>
                    </label>
                </div>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12">
                <button type="submit" class="default-btn">Send Message</button>
                <div id="msgSubmit" class="h3 text-center hidden"></div>
                <div class="clearfix"></div>
            </div>
        </div>
    </form>
</div>

Go to yoursite/theme/elan/javascript/contact-form-script.js and update the information following your one:

Go to yoursite/theme/elan/form-process.php and update the information following your one:

Please make sure your site php mail() function is enabled.

Was this article helpful to you? Yes No

How can we help?