Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
I'm having a form to collect emails from visitors

Code: Select all
<cms:form enctype="multipart/form-data" method="post" class="k_form">

                                                         <cms:if k_success >
                                                            <div class="k_successmessage">
                                                               <h3>Thank you for your subscription!</h3>
                                                               <cms:send_mail from=k_email_from to=k_email_to subject='One new subscriber to your mailinglist'>
                                                                  One visitor just signed up as a subscriber to the mailinglist:
                                                                  <cms:show k_success />
                                                               </cms:send_mail>

                                                               <h3>&nbsp;</h3>
                                                               <pre> <cms:show k_success /> </pre>
                                                            </div>
                                                         </cms:if>

                                                         <cms:if k_error >
                                                            <div class="k_errormessage">
                                                                                                                        
                                                               <ul>
                                                                  <cms:each k_error >
                                                                     <li><cms:show item /></li>
                                                                  </cms:each>
                                                               </ul>
                                                            </div>

                                                         </cms:if>
                                                         
                                                      <h3>Join the mailing list for the latest news</h3>
                                                    
                                    <cms:input type="text"  style="width: 95%; padding: 1px 2px;" name="email" placeholder="Enter your email address" required="1" validator="email" /> 

                                                   <cms:input name="submit" type="submit" value="OK" />
                                                   

                                                </cms:form>


But, if somebody submits an error, the

#kformname0 gets added to the site-link, like this:http://localhost:8888/#kformname0

Is there a way i can avoid that this happens?

Perhaps this is overkill, but i'd like to know why it happens and how i can avoid it!

Question 2: I added the html5-addon to get the placeholder-finction, but later i discovered that placeholder seems to work without it, even it was not documented
Please try adding anchor='0' to the <cms:form> tag.
Hope this helps.
Perfect! Works like a charm!
Thanks!
Welcome :)
4 posts Page 1 of 1