> 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.
You can start with tickets and patches in trac.cakephp.org. > 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. You can put your fieldset manually in plain old html, and the FormHelper::fields() mehotd also generates a fieldset around the fields. > And since you always put all the inputs in a list-like layout, it's > most logical to put it inside a list. First, I tink lists are for lists, you should look at them from a semantic point of view and not use the html for layout. Anyway, you can change the tags format of the helpers and also deactivate the div in FormHelper::input(), just take a look into the doc (book.cakephp.org). > Everything else can be arranged with css, but this is (I think) the > most proper html for this. I don't. > And I don't like divits, you know, that everything has to be in divs. Me either. > There are more useful elements beside divs. :P Agreed. > Now I could edit this in my copy of Cake, but that would mean I'd have > to edit it again with every update. Don't please, there are many other ways around, just a hint: http://cakebaker.42dh.com/2008/11/07/an-idea-for-hacking-core-helpers/ > That's why I would like to edit this in the real Cake project. > What do you think? Read the manual first, then complain :P HTH, - Dardo Sordi. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
