Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi

I'm getting an error message after implementing a contact form.
The message: ERROR! Closing tag "form" has no matching opening tag (line: 146 char: 2997)

I've checked my code, but in my opinion the form tag is closed. :-)
Am I overseeing something?

Thanks!

Code: Select all
<cms:form action='' method='post' id='contact_form'>
   <div class="form-group">
   <label>Voornaam</label>
   <cms:input type="text" class="form-control" id="voornaam" name="voornaam" placeholder="Uw voornaam" required="1"/>
   </div>
   <div class="form-group">
   <label>Familienaam</label>
   <cms:input type="text" class="form-control" id="familienaam" name="familienaam" placeholder="Uw familienaam" required="1"/>
   </div>
   <div class="form-group">
   <label>E-mailadres</label>
   <cms:input type="text" class="form-control" id="email" name="email" placeholder="Uw e-mailadres" required="1"/>
   </div>
   <div class="form-group">
   <label>Telefoonnummer</label>
   <cms:input type="text" class="form-control" id="telefoonnummer" name="telefoonnummer" placeholder="Uw telefoonnummer" required="1"/>
   </div>
   <div class="form-group">
   <label>Reeds bestaande klant?</label>
   <div class="radio">
   <cms:input type="radio" name="klant" id="klant" opt_values="Ja || Nee"/>
   </div>

   <h2>Bedrijfsgegevens</h2>
   <p>Onderstaande gegevens helpen ons om u zo snel en accuraat mogelijk te kunnen verhelpen.</p>
   
   <div class="form-group">
   <label>Vraag met betrekking tot</label>
   <div class="radio">
   <label>
   <cms:input type="radio" name="vraag over" id="vraag_over" opt_values="B&B || Hotel || Andere">
   </div>
   <div class="form-group">
   <label>Website van uw zaak</label>
   <cms:input type="text" class="form-control" id="website" name="website" placeholder="Uw website"/>
   </div>
   <div class="form-group">
   <label>Aantal kamers</label>
   <cms:input type="text" class="form-control" id="kamers" name="kamers" placeholder="Aantal kamers"/>
   </div>
   <div class="form-group">
   <label>Aantal werknemers</label>
   <cms:input type="text" class="form-control" id="werknemers" name="werknemers" placeholder="Aantal werknemers"/>
   </div>
   <div class="form-group">
   <label>Opstartjaar van uw zaak</label>
   <cms:input type="text" class="form-control" id="start" name="start" placeholder="Opstartjaar"/>
   </div>
   <div class="form-group">
   <label>U bent zaakvoerder sinds</label>
   <cms:input type="text" class="form-control" id="zaakvoerder_sinds" name="zaakvoerder_sinds" placeholder="Zaakvoerder sinds"/>
   </div>

   <h2>Uw vraag</h2>

   <div class="form-group">
   <label>Uw vraag of boodschap</label>
   <cms:input type="textarea" name="bericht" id="bericht" class="form-control" rows="10" />
   </div>
   <div class="form-group">
   <label>Wenst u een afspraak ter plaatse?</label>
   <div class="radio">
   <cms:input type="radio" name="afspraak" id="afspraak" opt_values="Ja || Nee"/>
   </div>

   <button type="submit" class="btn btn-default">Verzend uw aanvraag</button>

   <cms:if k_success >

      <p>Bedankt!</p>
   <cms:send_mail from="advies@2ndopinion.be" to="hello@samverdyck.be" subject="Offerte aanvraag via website" debug="1" >
      <cms:show k_success />
   </cms:send_mail>

   </cms:if>

   </cms:form>
Sometimes the error messages get confused about where the actual problem is. So when you get an error like this, you need to look for other tags that may be unclosed.

I found this unclosed input tag. Does fixing that solve the problem?
Code: Select all
<cms:input type="radio" name="vraag over" id="vraag_over" opt_values="B&B || Hotel || Andere">
Thanks, that did the job!
Sometimes the error messages get confused about where the actual problem is

I agree with Tim's observation.

I'd also like to add that since Couch has no built-in debugger, while developing a site I find the following useful (and perhaps you'll too) -

1. Add Couch tags incrementally i.e. instead of adding several tags in one go, add only a couple and test. If an error crops up, you'll know with certainty that it pertains to the last couple of changes you made.

2. A text editor (like Notepad++ on Windows) that highlights XML tag blocks makes it very easy to spot unclosed tags (like in your case).
4 posts Page 1 of 1