This is driving me nuts. I am working on my first modx site, and I keep getting the strict validation error... document type does not allow element "form" here. This is the only error that I am concerned with right now. I am pretty sure the reason for the error is because the form is being generated inside <p> tags. I added <p> tags around another contact form I have, and it caused it to get the same error. What’s getting me is that I can’t figure out why the <p> tags are being generated. I am also seeing <pre> tags generated after the form. I didn’t add any of these tags myself.
The following is the link to the form that is giving me so much trouble...
http://www.smilingdoug.com/cms_version/contact.html incase somebody wants to take a look at the code.
The following is the chunk I made for the form...
[+validationmessage+]
<form method="post" action="[~[*id*]~]" id="ContactForm">
<fieldset>
<input name="formid" type="hidden" value="ContactForm" />
<label for="cfName">Name:<br />
<input name="name" size="40" maxlength="40" id="cfName" class="text" type="text" eform="Your Name::1:" /></label><br />
<label for="cfEmail">Email:<br />
<input name="email" size="40" maxlength="40" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /></label><br />
<label for="cfRegarding">Subject:<br />
<input name="subject" size="40" maxlength="40" id="cfRegarding" class="text" type="text" eform="Form Subject::1" /></label><br />
<label for="cfMessage">Message:<br />
<textarea name="message" cols="60" rows="15" id="cfMessage" eform="Message:textarea:1"></textarea></label><br />
Please enter the security code shown in the graphic below:<br />
<img class="captcha" src="[+verimageurl+]" alt="verification code"/><br />
<label accesskey="c" for="vericode">Security Code:<br />
<input type="text" name="vericode" size="20" /></label><br />
<label> </label>
<p><input type="submit" name="contact" id="cfContact" class="button" value="Submit" /></p>
</fieldset>
</form>
The following is the only code that I have in the div that the form goes in...
<h2>[*longtitle*]</h2>
[*content*]
Any help would be greatly appreciated.