Created
January 16, 2013 14:38
-
-
Save andriesss/4547527 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
I would like to obtain the following elements: | |
<input type="text" name="foo[1]" /> | |
<input type="text" name="bar[1]" /> | |
*/ | |
$element= new Zend_Form_Element_Text(1); | |
$element->setLabel('foo'); | |
$element->setBelongsTo('foo'); | |
$this->addElement($element); | |
$element= new Zend_Form_Element_Text(1); | |
$element->setLabel('bar'); | |
$element->setBelongsTo('bar'); | |
$this->addElement($element); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've read @weierophinney 's response on http://zend-framework-community.634137.n4.nabble.com/Zend-Form-Element-set-name-allowBrackets-td679084.html, but this doesn't seem to work with elements that have the same name.