Lennaert Ekelmans
I'm Lennaert Ekelmans, The Netherlands, 22 years old, serial entrepreneur, web developer, CakePHP'er, hobby-photographer and trance-addict.
Since April I've a blog, read here why.
CakePHP: No markup with formhelper input
2009-04-10 11:30:00Just a short blog post about CakePHP, I see loads of people around me who don't want any markup like DIVS or LABELS around their form input elements. There are plenty reasons you don't want those markup, for example when you need your form in a table.
I see programmers using $form->select(); or $form->radio(); to avoid all the markup, but there's a simple trick to hide all the additional elements and still benefit from all the magic features of $form->input();
Just add two parameters in the input options:
input('title', array(
'div' => false,
'label' => false)
);
|
|
Write a commentI won't publish your e-mail address, website is optional |
