[TYPO3-content-rendering] TYPO3 3.8.0 XHTML strict mailform

Patrick Broens patrick at patrickbroens.nl
Fri Jun 17 21:00:55 CEST 2005


Hi everybody,

Joey (JoH) is right saying 'name' is not allowed for form tags, and still 
allowed for elements inside a form.
I'm developing a Questionaire extension and Ben asked me to see if I could 
get it XHTML Strict, which I did.

First of all I thought that the id for form elements was mandatory, which is 
not. If it was, the core of TYPO3 would have a big problem, because square 
brackets are not allowed in the id, which we are all using to send the 
variables to the piVar. In the name it is no problem at all. And almost 
every extensionwriter is using the name instead of the id.

The id in the formtag is optional as well, but when using the name 
attribute, you also have to use the id-attribute. Both of them must have the 
same value. You can use only the id in the form tag, because piVar reads it 
well.

Conclusion: use the id in the form tag (cannot have brackets, but in the 
form id we are not using them.)
Keep the variable names in the name attribute of form elements and use the 
id for css styling etc. The Attribute type for name is still CDATA in XHTML 
1.1, so the brackets won't be a problem.

Hope this clears the sky for a lot of you.

Patrick

"JoH" <info at cybercraft.de> wrote in message 
news:mailman.1.1117462411.16131.typo3-project-content-rendering at lists.netfielders.de...
>>>> 1. attribute "name" in form element
>>>
>>>
>>> We did a funny test back at our UG meeting.
>>> If you write "<input type="text" id="whatever" />" and send the form
>>>  the server does not recieve and POST or GET parameters called
>>> "whatever". Maybe someone can clear things up a bit but right now I
>>> think it is not possible to send POST vars while being 100% XHTML
>>> strict compatible.
>>
>> ignore - read wrong
>
> Sorry - initially it was me who read it wrong on the dev list.
> W3C say "name" is not allowed for form tags - but still allowed (and
> necessary) for elements inside a form.
>
> ;-)
>
> Joey
>
> -- 
> Wenn man keine Ahnung hat: Einfach mal Fresse halten!
> (If you have no clues: simply shut your knob sometimes!)
> Dieter Nuhr, German comedian
> openBC: http://www.openbc.com/go/invuid/Jo_Hasenau
>
> 





More information about the TYPO3-project-content-rendering mailing list