W3C home > Mailing lists > Public > www-voice@w3.org > April to June 2006

Forms & Input

From: Carel Klein <carel@klein.speedxs.nl>
Date: Wed, 28 Jun 2006 05:51:38 +0200
Message-ID: <44A1FCCA.1090203@klein.speedxs.nl>
To: www-voice@w3.org

Dear W3C,

I have a mailform with 3 inputs (2 text & button) and a text area. This 
so that people can send me a mail and to prevent spammers to find out my 
email address on my website. All works well (done with PHP) Yet when I 
want to validate it XHTML 1.0, (my entire site is XHTML 1.0 valid) then 
it'll give me the following errors. (See below the email, large ammount 
of text)

However, I can not find any error myself, unless a mailform and inputs 
aren't XHTML at all. Note that I took this mailform from the W3C website 
(the PHP area) after my own mailform wasn't W3C XHTML 1.0 either.

The question is, can I make a mailform that is W3C at all?

URI to page: http://www.klein.speedxs.nl/testmail.php
URI to Validated page: 
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.klein.speedxs.nl%2Ftestmail.php

The errors:  (this mail is not sent in HTML but in Text to keep the 
formatting as it is in the code)

# Error  Line 40 column 42: document type does not allow element "form" 
here; missing one of "ins", "del", "map" start-tag.

<form method="post" action="testmail1.php">

The mentioned element is not allowed to appear in the context in which 
you've placed it; the other mentioned elements are the only ones that 
are both allowed there and can contain the element mentioned. This might 
mean that you need a containing element, or possibly that you've 
forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a 
block-level element (such as "<p>" or "<table>") inside an inline 
element (such as "<a>", "<span>", or "<font>").

?
# Error Line 41 column 33: document type does not allow element "input" 
here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", 
"pre", "address", "fieldset", "ins", "del" start-tag.

<input name="email" type="text" />

?
# Error Line 42 column 35: document type does not allow element "input" 
here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", 
"pre", "address", "fieldset", "ins", "del" start-tag.

<input name="subject" type="text" />

?
# Error Line 43 column 44: document type does not allow element 
"textarea" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", 
"div", "pre", "address", "fieldset", "ins", "del" start-tag.

<textarea name="message" rows="15" cols="40"></textarea>

?
# Error Line 44 column 22: document type does not allow element "input" 
here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", 
"pre", "address", "fieldset", "ins", "del" start-tag.

<input type="submit" />

?
# Error Line 45 column 5: end tag for "form" omitted, but OMITTAG NO was 
specified.

</pre>

You may have neglected to close an element, or perhaps you meant to 
"self-close" an element, that is, ending it with "/>" instead of ">".

?
# Info Line 40 column 0: start tag was here.

<form method="post" action="testmail1.php">

# Error Line 46 column 6: end tag for element "form" which is not open.

</form>
Received on Wednesday, 28 June 2006 03:53:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 30 October 2006 12:49:03 GMT