Thanks Matthew.

Two things:

1. I need to set value and label to have same value:

)->addElement(
            'button',
            'trash',
            array(
                'label' => '<span class="ui-icon
ui-icon-trash">&nbsp;</span>Trash',
                'value' => '<span class="ui-icon
ui-icon-trash">&nbsp;</span>Trash'
            )
        );

2. isChecked returns false when button is clicked, and true if it's not!?!?

At least I can detect now :)

Regards,
Saša Stamenković


On Sat, Nov 28, 2009 at 10:31 PM, Matthew Weier O'Phinney
<[email protected]>wrote:

> -- umpirsky <[email protected]> wrote
> (on Saturday, 28 November 2009, 11:39 AM -0800):
> > I'm looking at http://framework.zend.com/issues/browse/ZF-2465
> >
> > Does this:
> >
> > $form->populate($data);
> > if ($form->save->isClicked()) {
> >     // 'save' submit was clicked
> > }
> >
> > works for anyone.
> >
> > I don't see this isClicked method implemented at all.
> >
> > I have two buttons (type submit) and I want to detect which one is
> clicked.
>
> Use isChecked() -- this was used to ensure a consistent API between
> buttons, checkboxes, and radios.
>
> --
> Matthew Weier O'Phinney
> Project Lead            | [email protected]
> Zend Framework          | http://framework.zend.com/
>

Reply via email to