-- Joó Ádám <[email protected]> wrote
(on Monday, 16 February 2009, 06:09 PM +0100):
> Can I somehow get the input buttons not to have a name, therefore not
> to present among posted values? It would be very nice to just write
> $table->insert($this->_request->getPost()) rather than creating a new
> array element-by-element.
>
> I tried to use an ampty and a null value for the name attribute in my
> configuration, but it throws an error. Any workarounds?
You're looking for the 'ignore' attribute. You can set it
programmatically using this:
$submit->setIgnore(true);
Or by passing a boolean true value to the 'ignore' configuration key
during instantiation:
$form->addElement('submit', 'foo', array(
'label' => 'Submit',
'ignore' => true,
));
When this flag is set, then Zend_Form will ignore the element when
you call getValues().
--
Matthew Weier O'Phinney
Software Architect | [email protected]
Zend Framework | http://framework.zend.com/