Zend Framework: Working with Form elements in array notation
问题 I would like to be able to add a hidden form field using array notation to my form. I can do this with HTML like this: <input type="hidden" name="contacts[]" value="123" /> <input type="hidden" name="contacts[]" value="456" /> When the form gets submitted, the $_POST array will contain the hidden element values grouped as an array: array( 'contacts' => array( 0 => '123' 1 => '456' ) ) I can add a hidden element to my form, and specify array notation like this: $form->addElement('hidden',