-- Mary Nicole Hicks <[hidden email]> wrote
(on Wednesday, 30 July 2008, 08:04 PM -0700):
> This one has me stumped. I am just adding buttons to a form with Zend
> Framework. Each of these buttons is ending up on a single line.
> Does anyone know how to get multiple buttons on to one line using Zend_Form?
> Any example code to do this?
There are a variety of ways. First, you can use different decorators. By
default, buttons are in a <dd> of their own, which is why you see them
on multiple lines.
Another way is to use a display group. This will allow you to wrap all
the buttons in a single <dd>; it would best be used in conjunction with
the previous suggestion. That might look something like this:
// assume 'save', 'cancel', and 'reset' are buttons with the
// following decorator(s):
$form->addDisplayGroup(array('save', 'cancel', 'reset'), array(
'decorators' => array(