Hello, I have a contact form on my index page, and when I press the submit button, nothing is working. My code is as follows.
The code looks right to me, but I could very well be overlooking something small. Could anyone possibly tell me what I am doing wrong? thanks in advance!
- Code: Select all
<cms:form role="form" id="contact_form" class="contact-form" method="post" onSubmit="return false">
<!-- Form -->
<div class="contact-right padding-top-30 padding-left-30">
<!-- Success Msg -->
<cms:if k_success>
<div id="contact_message" class="success-msg" style="display:block"> <i class="fa fa-paper-plane-o"></i>Thank You. Your Message has been submitted!</div>
<cms:send_mail from=k_email_from to=k_email_to subject='subject'>
<cms:show k_success />
</cms:send_mail>
</cms:if>
<cms:if k_error>
<div id="contact message" class="failure-msg" style="display:block"> <i class="fa fa-ban"></i>Please fill out the required fields.</div>
</cms:if>
<!-- FORM -->
<ul class="row">
<li class="col-sm-4">
<label>
<cms:input type="text" class="form-control" name="name" id="name" placeholder="NAME" required='1' />
<cms:if k_error_name>
<p>Please enter your name.</p>
</cms:if>
</label>
</li>
<li class="col-sm-4">
<label>
<cms:input type="text" class="form-control" name="email" id="email" placeholder="EMAIL" required='1' validator='email' />
<cms:if k_error_email>
<p>Please enter your email address.</p>
</cms:if>
</label>
</li>
<li class="col-sm-4">
<label>
<cms:input type="text" class="form-control" name="subject" id="subject" placeholder="SUBJECT" required='1' />
<cms:if k_error_subject>
<p>Please enter a subject.</p>
</cms:if>
</label>
</li>
<li class="col-sm-12">
<label>
<cms:input type="textarea" class="form-control" name="message" id="message" rows="5" placeholder="CONTENT..." required='1' />
<cms:if k_error_message>
<p>Please type a message.</p>
</cms:if>
</label>
</li>
<li class="col-sm-12">
<cms:input type='submit' name='submit' button type="submit" value="SEND" id="btn_submit"/>
</li>
</ul>
</cms:form>
</div>
</div>
</section>
The code looks right to me, but I could very well be overlooking something small. Could anyone possibly tell me what I am doing wrong? thanks in advance!