This particular page will give a detailed explanation of the problems: http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.desfrenes.com%2Fbadweb2pymarkup
On Apr 6, 10:23 am, desfrenes <desfre...@gmail.com> wrote: > See down this page for a valid markup form > example:http://www.desfrenes.com/blog/post/quel-framework-web-python-choisir > It is implemented using definition lists (<dl>, <dt>, <dd>) which is > way more flexible than tables in terms of css styling. > > Of course, you don't have to use definition lists but at least if you > use tables, the markup should be valid. > > Digging through web2py's code I found that SQLFORM seems tied to > certain HTML elements since you use TR helper. How a user is supposed > to change the markup ? Other frameworks (see Zend for example) use > form decorators to achieve this so it's always possible to change the > markup. Does web2py allow that ? > If it's not possible, web2py should use a markup that is more flexible > (like the definition list). > > Web2py advertises that it "enforces good software engineer practices", > which is great, but I think it should also enforce good web > development pratices such as the respect for w3c's standards. > > For now, apart from the flexibility issue, here's how a web2py form > could be valid:http://www.desfrenes.com/goodweb2pymarkup(original > form markup is here:http://www.desfrenes.com/badweb2pymarkup). > > The changes are minor, just putting the hidden inputs in invisible <p> > and replacing type="text" in textarea with class="text". > > What do you think ? I really like the idea of having automated forms, > but strict conformance to dtds is part of our quality policy here. > Without it, I'm left to hand-writing forms in the view. > > Regards, > > Mickaël. > > ps: this firefox extension is a must:http://users.skynet.be/mgueury/mozilla/ > . It allows for easy markup validation. > > On Apr 6, 6:53 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > This may break backward compatibility. Anyway, send me an example of > > how you think the output should be. > > > Massimo > > > On Apr 5, 8:09 pm, desfrenes <desfre...@gmail.com> wrote: > > > > Hi, > > > > Is it possible to make the default markup for SQLFORMs w3c valid ? > > > > Right now there are hidden inputs (I suppose they're here for anti- > > > CSRF) which are not in block elements. This problem can be addressed > > > easily by using a fieldset. > > > > And also textareas have a "type" attribute which is not valid (what > > > for ?). > > > > These issues may be minor but since browsers are very "sensible", I > > > prefer to avoid quirks. > > > > Mickael. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---