To use the contact form functionality with Molab, make sure the required plugin is installed and configured properly.
Install the Contact Form plugin from the official Moodle plugin directory:
🔗 https://moodle.org/plugins/local_contact
✅ This plugin must be installed and active for the contact form to work.
For full configuration details and usage instructions, refer to the plugin’s documentation:
📚 https://github.com/michael-milette/moodle-local_contact
Below is the contact form shortcode used in the Molab theme. You can paste this into any HTML block or content area where you want the form to appear:
<form id="contactForm" action="../../local/contact/index.php">
<div class="row">
<div class="col-lg-6 col-sm-6">
<div class="form-group">
<label>Name</label>
<input type="text" name="name" id="name" class="form-control" required >
</div>
</div>
<div class="col-lg-6 col-sm-6">
<div class="form-group">
<label>Email</label>
<input type="email" name="email" id="email" class="form-control" required>
</div>
</div>
<div class="col-lg-6 col-sm-6">
<div class="form-group">
<label>Phone</label>
<input type="text" name="phone_number" id="phone_number" required class="form-control">
</div>
</div>
<div class="col-lg-6 col-sm-6">
<div class="form-group">
<label>Subject</label>
<input type="text" name="msg_subject" id="msg_subject" class="form-control" required >
</div>
</div>
<div class="col-lg-12">
<div class="form-group">
<label>Message</label>
<textarea name="message" class="form-control" id="message" cols="30" rows="6" ></textarea>
</div>
</div>
<input type="hidden" id="sesskey" name="sesskey" value="">
<script>document.getElementById('sesskey').value = M.cfg.sesskey;</script>
<div class="col-lg-12 col-md-12">
<button type="submit" class="default-btn">
Send Massage
</button>
<div id="msgSubmit" class="h3 text-center hidden"></div>
<div class="clearfix"></div>
</div>
</div>
</form>