I am using the couch forms tags for a site and the error handling works great, but whenever I submit for success, the success message doesn't load and it adds this to the URL: http://XXXX.com/#kformname0
When I set the form to debug, the txt file says that it has been sent successfully. Unfortunately the success message doesn't appear on the page and the email doesn't actually go out. Any idea where I am going wrong?
When I set the form to debug, the txt file says that it has been sent successfully. Unfortunately the success message doesn't appear on the page and the email doesn't actually go out. Any idea where I am going wrong?
- Code: Select all
<cms:if k_success>
<div class="gap-10"></div>
<div class="alert alert-success" role="alert">Success! Your message has been sent and we will be in touch shortly.</div>
<cms:send_mail from='hello@xxx.com' to='jon@xxx.com' subject='New Contact Form'>
Below are the contact details from the user:
<cms:show k_success />
</cms:send_mail>
</cms:if>
<cms:form action='' method='post' id='contact_form' accept-charset="utf-8">
<label>Name</label>
<cms:input type='text' name='name' id='name' required='1'/>
<cms:if k_error_name>
<div class="gap-10"></div>
<div class="alert alert-danger" role="alert">Please enter your name.</div>
</cms:if>
<label>Email address</label>
<cms:input type='text' name='email' id='email' required='1' validator='email' />
<cms:if k_error_email>
<div class="gap-10"></div>
<div class="alert alert-danger" role="alert">Please enter a valid email.</div>
</cms:if>
<label>Phone number</label>
<cms:input type='text' name='phone' id='phone' />
<label>Message</label>
<cms:input class="mes" type='textarea' name='message' id='message' required='1'></cms:input>
<cms:if k_error_message>
<div class="gap-10"></div>
<div class="alert alert-danger" role="alert">Please enter your message.</div>
</cms:if>
<input class="submit" type="submit" value="Send Message">
</cms:form>