Exclude elements from Zend\Form's getData()
If you need to exclude some elements from a Zend\Form's getData(), the easiest way is to use a validation group. For example: class SomeForm extends \Zend\Form\Form implements \Zend\InputFilter\InputFilterProviderInterface { public function init() { $this->add([ 'name' => 'name', 'options' => ['label' => 'Name'], ]); $this->add([ 'name' => 'email', 'options' => ['label' => 'Email'], ]); $this->add([ 'name' => 'submit', 'type' => 'button', 'options' => [ 'label' => 'Filter', ], ]); $this->setValidationGroup(['name', 'email']); } public function getInputFilterSpecification() {… continue reading.


