just update the html helper to do what you want. Just look in the Cake/ libs/views/helpers directory for the html.php. Copy that into your helpers directory in app/views. Then you can have it spit out whatever you want.
On Nov 16, 6:01 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > as Marcelo says 2nd point > > http://groups.google.com/group/cake-php/browse_thread/thread/efccb52c...http://api.cakephp.org/class_form_helper.html > > 2008/11/16 Evert <[EMAIL PROTECTED]> > > > > > 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 -~----------~----~----~----~------~----~------~--~---
