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

I keep having a issue with spam on a contact form on a clients website, I have google recaptcha integrated and if the checkbox is not checked, it says you are a bot go away but the spam emails keep getting through somehow, is there anything else I can do or maybe use couch form tags in the code if it would help, below is the current code I have

Code: Select all
<form role="form" class="contact-form" method="post" action="<cms:show k_site_link />sendenquiry.php" >
                        <div class="col-md-12 col-xs-12">
                           <div class="row">
                              <div class="form-group">
                                 <input class="form-control" id="name" name="name" placeholder="Name" type="text">
                                 <span class="alert-error"></span>
                              </div>
                           </div>
                        </div>
                        <div class="row">
                           <div class="col-md-6 col-sm-6 col-xs-12">
                              <div class="form-group">
                                 <input class="form-control" id="email" name="email" placeholder="Email*" type="email">
                                 <span class="alert-error"></span>
                              </div>
                           </div>
                           <div class="col-md-6 col-sm-6 col-xs-12">
                              <div class="form-group">
                                 <input class="form-control" id="phone" name="phone" placeholder="Phone" type="text">
                                 <span class="alert-error"></span>
                              </div>
                           </div>
                        </div>
                        <div class="col-md-12 col-xs-12">
                           <div class="row">
                              <div class="form-group comments">
                                 <textarea class="form-control" id="comments" name="message" placeholder="Message"></textarea>
                              </div>
                           </div>
                        </div>
                                <div class="col-md-12 col-xs-12">
                                    <div class="row">
                                        <div class="form-group">
                                            <div class="g-recaptcha" data-sitekey="sitekey"></div>
                                        </div>
                                    </div>
                                </div>
                        <div class="col-md-12 col-xs-12">
                           <div class="row">
                              <div class="form-group button">
                                    <button type="submit" class="btn primary" name="submit">Send Message <i class="fa fa-paper-plane"></i></button>
                                 </div>
                           </div>
                        </div>
                     </form>


It's using phpmailer, I'm put of ideas on how to solve the issue
Your form is not Couch managed (i.e. does not use <cms:form>).
I'd suggest you switch over to <cms:form> and then use the two methods of fighting spam (against bots and humans) shown in the docs - https://docs.couchcms.com/concepts/databound-forms.html

Hope this helps.
Thank you KK, will look at that and see if can integrate it as not used databound forms before, if get stuck will post on this post/topic if ok
I have implement the forms so now use the couchcms form tags and implemented the security from the databound forms link and seems to be working perfect

Thank you KK
4 posts Page 1 of 1