Forum for discussing general topics related to Couch.
8 posts Page 1 of 1
This is driving me mad... I have gone through checking the form and I see no faults (I maybe overlooking it now). But the submit button just doesn't do anything? Could this be a js conflict? I have maps on the contact page too?

Code: Select all
<cms:form action='' method='post' class='contact-form' >
                     <div class="row">
                        <fieldset class="column column-1-2">
                                   <cms:input type='text' name='name' id='name' required='1' class='text-input' placeholder='Your Name *' />
                           
                           <cms:input type='text' name='email' id='email' required='1' validator='email' class="text-input" placeholder="Your Email *"  />
                                    <cms:input type='text' name='phone' id='phone' validator='non_negative_integer | exact_len=11' class="text-input" placeholder="Contact Number"  />
                        </fieldset>
                        <fieldset class="column column-1-2">
                                <cms:input type='textarea' name='message' id='message' required='1' rows="12" cols="60" placeholder="Your Message *"></cms:input>
                                <cms:input type="text" required='1' validator='regex=/^cold$/i' class="text-input" id="human" name="human"  placeholder='Prove you are human, is ice hot or cold?' />
                           
                        </fieldset>
                     </div>
                            <div class="row">
                            <div class="column column-1">
                               
                                <cms:if k_error_human>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>Sorry you failed the security question.</p>
                                                        </div>
                                                       </cms:if>
                                          <cms:if k_error_name>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>You forgot to enter your name</p>
                                                        </div>
                                                       </cms:if>
                                                        <cms:if k_error_email>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>You forgot to enter your email</p>
                                                        </div>
                                                       </cms:if>
                                                        <cms:if k_error_phone>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>Sorry we didn't catch your number, ensure that you include the area code (11 digits)</p>
                                                        </div>
                                                       </cms:if>
                                                        <cms:if k_error_message>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>You forgot to enter your message</p>
                                                        </div>
                                                       </cms:if>
                                                   
                                                        <cms:if k_success>
                                                        <div class="alert alert-default alert-success alert-style-square">
                   Thank you! Your message has been sent. We aim to reply within the next 24 hours.
               </div>
                    <cms:send_mail from='info@srewebsolutions.co.uk' to='admin@srewebsolutions.com' subject='Enquiry'>
                    The following contains the message:
                    <cms:show k_success />
                    </cms:send_mail>
                    </cms:if>
                               
                               
                               
                                </div>
                            </div>
                     <div class="row margin-top-30">
                                <div class="column column-1-2">
                           <p class="description t1">We will contact you within one business day.</p>
                        </div>
                        <div class="column column-1-2 align-right">
                        
                           <input type="submit" value="Submit Message" class="more active"/>
                        </div>
                     </div>
                   </cms:form>

It is expected to send mail. Does it sent it?
Did you try to place cms:input type='submit' name='submit' instead of ordinary input?

In k_success block we usually place <cms:redirect k_page_link /> to reload the page. It helps to indicate that form is 'sent'.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
trendoman wrote: It is expected to send mail. Does it sent it?
Did you try to place cms:input type='submit' name='submit' instead of ordinary input?

In k_success block we usually place <cms:redirect k_page_link /> to reload the page. It helps to indicate that form is 'sent'.


It's not doing anything. Even with the fields empty. I try to click the 'button' and nothing happens what so ever. It's like the button is dead, it triggers nothing.
Why do you have a pair of inputs here?
<cms:input type='textarea' name='message' id='message' required='1' rows="12" cols="60" placeholder="Your Message *"></cms:input>
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
I removed that erroneous closing input and form is working on my localhost. Now, it should be working too on your place :)
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
trendoman wrote: Why do you have a pair of inputs here?
<cms:input type='textarea' name='message' id='message' required='1' rows="12" cols="60" placeholder="Your Message *"></cms:input>


That is the textarea field? I used that exact code from the documentation. Without the closing tag it would break to the page. I have made it the following instead ( with a trailing />). But still not working my end. The button just doesn't trigger anything.

Code: Select all
<cms:form action='' method='post' class='contact-form' >
                     <div class="row">
                        <fieldset class="column column-1-2">
                                   <cms:input type='text' name='name' id='name' required='1' class='text-input' placeholder='Your Name *' />
                           
                           <cms:input type='text' name='email' id='email' required='1' validator='email' class="text-input" placeholder="Your Email *"  />
                                    <cms:input type='text' name='phone' id='phone' validator='non_negative_integer | exact_len=11' class="text-input" placeholder="Contact Number"  />
                        </fieldset>
                        <fieldset class="column column-1-2">
                                <cms:input type='textarea' name='message' id='message' required='1' rows="12" cols="60" placeholder="Your Message *" />
                               
                                <cms:input type="text" required='1' validator='regex=/^cold$/i' class="text-input" id="human" name="human"  placeholder='Prove you are human, is ice hot or cold?' />
                           
                        </fieldset>
                     </div>
                            <div class="row">
                            <div class="column column-1">
                               
                                <cms:if k_error_human>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>Sorry you failed the security question.</p>
                                                        </div>
                                                       </cms:if>
                                          <cms:if k_error_name>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>You forgot to enter your name</p>
                                                        </div>
                                                       </cms:if>
                                                        <cms:if k_error_email>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>You forgot to enter your email</p>
                                                        </div>
                                                       </cms:if>
                                                        <cms:if k_error_phone>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>Sorry we didn't catch your number, ensure that you include the area code (11 digits)</p>
                                                        </div>
                                                       </cms:if>
                                                        <cms:if k_error_message>
                                                        <div class="alert alert-default alert-danger alert-style-square">
                                                       <p>You forgot to enter your message</p>
                                                        </div>
                                                       </cms:if>
                                                   
                                                        <cms:if k_success>
                                                        <div class="alert alert-default alert-success alert-style-square">
                   Thank you! Your message has been sent. We aim to reply within the next 24 hours.
               </div>
                    <cms:send_mail from='info@sturdigaragedoors.co.uk' to='admin@srewebsolutions.com' subject='Enquiry From Sturdi Garage Doors'>
                    The following contains the message from Sturdi Garage Doors:
                    <cms:show k_success />
                    </cms:send_mail>
                    </cms:if>
                               
                               
                               
                                </div>
                            </div>
                     <div class="row margin-top-30">
                                <div class="column column-1-2">
                           <p class="description t1">We will contact you within one business day.</p>
                        </div>
                        <div class="column column-1-2 align-right">
                        
                           <input type="submit" value="Submit Message" class="more active"/>
                        </div>
                     </div>
                   </cms:form>

Well, it's working on my side. PM me ftp creds or recreate a simplest form yourself and see if it works, then add couch tags one by one.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
trendoman wrote: Well, it's working on my side. PM me ftp creds or recreate a simplest form yourself and see if it works, then add couch tags one by one.


It must be a js conflict? I'll try eliminating some js that is being called
8 posts Page 1 of 1