I assumed I'd missed the 'before', 'between' etc.. options when looking through the documentation/api. In fact I've gone through it again and still can't find any documentation of these options. I had to go to the source before I found any confirmation that they existed (not that I doubted you, of course, but for my own piece of mind!). Have a missed a consolidated list of these useful options for this and any other functions, or is a delve into the source required each time?
On May 2, 3:17 pm, "annie.r.knight" <[EMAIL PROTECTED]> wrote: > Looks like it might just ease the pain. > > Thank you very much. > > On May 2, 2:53 pm, grigri <[EMAIL PROTECTED]> wrote: > > > $defaults = array( > > 'before' => '<tr><th>', > > 'between' => '</th><td>', > > 'after' => '</td></tr>', > > 'div' => false // Don't forget this > > ); > > $inputs = array( > > 'fieldset' => false, // Don't forget this > > 'eggs' => array_merge($defaults, array('type' => 'text', 'value' => > > 'test')), > > 'bacon' => array_merge($defaults, array('type' => 'text', 'value' => > > 'ing')) > > ); > > echo '<table>'; > > echo $form->inputs($inputs); > > echo '</table>'; > > > [I've posted a ticket to integrate a 'defaults' key into > > FormHelper::inputs() to avoid the array_merge thingy, for the future!] > > > On May 2, 2:43 pm, "annie.r.knight" <[EMAIL PROTECTED]> > > wrote: > > > > Hi all. > > > > I have an app with a number of long forms in. These forms are > > > formatted in tables with each row looking something like: <th>Input > > > Label</th><td>Text Box [Or Whatever]</td>. While the long term > > > solution clearly is to migrate this to CSS design I'm going for the > > > quick (and dirty) solution for now using Cake to generate the form and > > > then putting it into the table. > > > > All I'm doing is to set each input's 'label' option to '' [blank] and > > > manually putting the Label I want in an adjacent table cell. > > > > Is there a better way of doing this? > > > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---