How is a ul better than 'divitis'? 'listitis' uses more markup and forms are not a list like a grocery list. I don' think that making a UL improves the semantics of a form, just makes them different. However, the form helper lets you change the wrapping divs. to whatever you choose. Or you can make your own input() method wrapper that does exactly what you want. As for the fieldsets, you do have to add those in yourself in both form situations.
You can edit your copy of Cake, but at this stage in the release we are not changing things. Perhaps open an enhancement and it can be dealt with in a future release. -Mark On Nov 16, 5:18 pm, Evert <[EMAIL PROTECTED]> wrote: > Like the title says, I don't like the html that the form-helper > outputs. > So I was wondering if and how I could take part into the developing of > CakePHP. > Because I would like to improve the html-outputs of some of the > helpers and stuff. > > For example, in the blog-application the form-helper creates this html > for adding a post: > ------------------------------------------------------------------------------------------------------------------------------------------------- > <form id="PostAddForm" method="post" action="/cake2/posts/add"> > <fieldset style="display:none;"> > <input type="hidden" name="_method" value="POST" /> > </fieldset> > > <div class="input text"> > <label for="PostTitle">Title</label> > <input name="data[Post][title]" type="text" maxlength="50" > value="" > id="PostTitle" /> > </div> > > <div class="input textarea"> > <label for="PostBody">Body</label> > <textarea name="data[Post][body]" cols="30" rows="6" > id="PostBody"></textarea> > > </div> > > <div class="submit"> > <input type="submit" value="Save Post" /> > </div> > </form> > ------------------------------------------------------------------------------------------------------------------------------------------------- > > I had put the indents there myself cause Cake screws that up as well. > Anyway, I would like to change that html to this: > > ------------------------------------------------------------------------------------------------------------------------------------------------- > <form id="PostAddForm" method="post" action="/cake2/posts/add"> > <fieldset> > <legend>Add post</legend> > > <ul> > <li> > <label for="PostTitle">Title</label> > <input name="data[Post][title]" type="text" > maxlength="50" > value="" id="PostTitle" /> > </li> > > <li> > <label for="PostBody">Body</label> > <textarea name="data[Post][body]" cols="30" > rows="6" id="PostBody"></textarea> > > </li> > > <li> > <input type="hidden" name="_method" > value="POST" /> > <input type="submit" value="Save Post" /> > </li> > </ul> > </fieldset> > </form> > ------------------------------------------------------------------------------------------------------------------------------------------------- > > Everything has to be inside a fieldset, that's proper html. > And since you always put all the inputs in a list-like layout, it's > most logical to put it inside a list. > Everything else can be arranged with css, but this is (I think) the > most proper html for this. > And I don't like divits, you know, that everything has to be in divs. > There are more useful elements beside divs. :P > Now I could edit this in my copy of Cake, but that would mean I'd have > to edit it again with every update. > That's why I would like to edit this in the real Cake project. > > What do you think? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
