Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi,

Has anything change with regards to how form submission is handled in v2.2.1 (20200116)?
I don't seem to be getting any response from k_success.

The reason I ask is on my MacBook it does work on my main contact form and the only difference I can fdind is the version - 2.2 (20190417). I've copied the file across to my PC and tried the exact same file with no joy - just refreshes the page.

I've put the code below

Code: Select all
<p class="c-message">
Please complete the form below and we'll be in touch as soon as possible.
</p>
<cms:form method="post" class="c-form" enctype="multipart/enc">
  <cms:if k_success>
    <div class="c-success">
   <h3>Thank you for getting touch!</h3>
   <p>We appreciate you contacting us. If your inquiry is urgent please call us on <span style="font-family:Verdana;">07xxxxxxxxxxx</span></p>
   <p>Otherwise, we will reply by email as soon as possible.</p>
  </div>
  <script>$(document).ready(function() { $(".c-message").css('display', 'none'); });</script>
  <cms:else />
   <cms:if k_error_name><script>$('#name').style.border="red";</script></cms:if>
   <cms:input type="text" name="name" placeholder="Name" required="1" />
                  
        <cms:input type="email" name="email" placeholder="Email Address" required="1" validator="email" />
        <cms:input type="url" name="website" placeholder="Website (Optional)" />
        <cms:input type="textarea" name="message" placeholder="Message" required="1" />

      <cms:capture "recaptcha_buffer">
     <cms:input type="recaptcha" name="ic_captcha" />
   </cms:capture>
   <cms:if "<cms:not k_success />">
     <cms:show recaptcha_buffer />
   </cms:if>
  <cms:input type="submit" value="Submit" name="submit" />
</cms:if>
</cms:form>


I've tried separating into 2 if tests but doesn't seem to make any difference. Is there a debug flag or similar like with send_email?

Many Thanks
Ian
To debug, please place a <cms:dump /> tag just below the opening <cms:form> tag e.g. -
Code: Select all
<cms:form method="post" class="c-form" enctype="multipart/enc">
    <cms:dump />

Try submitting the form and chances are you'll see what is going wrong.

Hope this helps.
Hi KK,

That did help. Turned out it was the Captcha causing the issue because I hadn't turned on the add-on :shock:
3 posts Page 1 of 1
cron