As rendered in current version: ====================== <form action="" enctype="multipart/form-data" method="post"> <table> <tbody> <tr id="user_email__row"> <td> <label for="user_email" id="user_email__label">E- mail</label> </td> <td> <input class="string" id="user_email" name="email" value="" type="text"> </td> <td> </td> </tr> <tr id="user_password__row"> <td> <label for="user_password" id="user_password__label">Password</label> </td> <td> <input class="password" id="user_password" name="password" value="" type="password"> </td> <td> </td> </tr> <tr id="submit_record__row"> <td> </td> <td> <input value="Submit" type="submit"> </td> <td> </td> </tr> </tbody> </table> <input name="_formkey" value="6c27db25-8afa-402a-8172-053bc04e1b09" type="hidden"> <input name="_formname" value="default" type="hidden"> </form>
As proposed: ========== <form action="/application/controller/function" enctype="multipart/ form-data" method="post"> <table> <tbody> <tr id="user_email__row"> <td> <label for="user_email" id="user_email__label">E- mail</label> </td> <td> <input class="string" id="user_email" name="email" value="" type="text"> </td> <td> </td> </tr> <tr id="user_password__row"> <td> <label for="user_password" id="user_password__label">Password</label> </td> <td> <input class="password" id="user_password" name="password" value="" type="password"> </td> <td> </td> </tr> <tr id="submit_record__row"> <td> </td> <td> <input value="Submit" type="submit"> </td> <td> </td> </tr> <tr id="hidden__row"> <td> </td> <td> <input name="_formkey" value="6c27db25-8afa-402a-8172-053bc04e1b09" type="hidden"> <input name="_formname" value="default" type="hidden"> </td> <td> </td> </tr> </tbody> </table> </form> Added: action, hidden_row. Now it is valid XHTML 1.0 Strict Since I'm all into validation and css these days, I might be back with some more observations. I hope not, though :) On Jan 20, 4:23 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > Can you cut and paste an example of how the output should be? > > Thank you for pointing this out. > > Massimo > > On Jan 19, 9:06 pm, Tari <robert.t...@gmail.com> wrote: > > > Hello, > > > While going through my project output pages and validating them as > > "XHTML 1.0 Strict" I've learnt that > > SQLFORM creates a form with a table containing the DB labels and DB > > form elements, which is XHTML compliant up to that point. What fails > > the validation are the "_formkey" and "_formname" input fields that > > fall > > outside the table, placed just before the form's closing tag. > > > May I propose to create an additional row for the hidden elements and > > thus keep them bundled with the rest of the form content? That ensures > > XHTML compliance. (Tested) > > > While at it, there is another issue: the "action" attribute is by > > default blank (invalid XHTML). Here I'd suggest that the forms use > > e.g. URL(r = request) as a devault value, instead of the blank string. > > This would not upset the existing concept - the programmer would be > > able to pass a custom "_action" just as before. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---