Re: Forms & Input

Hi Carel,

www-voice is the wrong list, but anyway...

At 06:57 28/06/2006, Carel Klein wrote:
>Add-on to my previous e-mail concerning the Forms & Input. I had a </pre> 
>tag inside the form while it opened outside the form so the error messages 
>are revised now. The question still remains the same that if it is 
>possible to make a Form W3C.
>
>In the meantime I have been taking a look at forms on several websites and 
>all give me the same errors, which kind of tells me that Forms aren't a W3 
>standard thing...

Forms are very much "a W3C standard thing": see 
http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html.

>However, I'm most willing to learn otherwise for I have not yet found a 
>satisfying answer.
>
>Revised error message below.. URL's are the same.
>
>   1. 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>").
>
>      ?
> 
><http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.klein.speedxs.nl%2Ftestmail.php;errmsg_id=65#errormsg>

You say that you have a pre element inside the form element, which would be 
valid, but in reality, you have a form element inside a pre element, which 
is not valid.


>   2. 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" /*>*|
>
>      ?
> 
><http://validator.w3.org/feedback.html?uri=http%3A%2F%2Fwww.klein.speedxs.nl%2Ftestmail.php;errmsg_id=65#errormsg>

You can't nest input, textarea, select and button elements directly inside 
the form element.
If you had

<form method="post" action="testmail1.php">
<p><input name="name" type="text" value="Your Name" /></p>
<!-- rest of form omitted -->
instead of

<form method="post" action="testmail1.php">
<input name="name" type="text" value="Your Name" />

that would be valid.

By the way, pre is for "preformatted text", not for keeping line breaks 
between form controls in a form.

Regards,

Christophe

-- 
Christophe Strobbe
K.U.Leuven - Departement of Electrical Engineering - Research Group on 
Document Architectures
Kasteelpark Arenberg 10 - 3001 Leuven-Heverlee - BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/ 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

Received on Wednesday, 28 June 2006 09:38:30 UTC