-2

Using Zend 1.9 I am trying to generate a form using Zend Form module . My form should be like this:

<form method="post" action="myaction">

    <input type="text" name="editors[]" />
    <input type="text" name="editors[]" />
    <input type="text" name="editors[]" />
    <input type="text" name="editors[]" />

    <button type="submit" >Go</button>

</form>

When I submit the form in my controller I want to see something like this:

Zend_Debug::dump($this->getAllParams());

//I expect this output:
array (size=4)
  'controller' => string 'myCotnroller' (length=8)
  'module' => string 'MyModule' (length=14)
  'action' => string 'test' (length=4)
  'editors' => 
    array (size=4)
      0 => string '' (length=3)
      1 => string '' (length=0)
      2 => string '' (length=0)
      3 => string '' (length=0)

I the last week I tried many and many times with no result. I have search whitout any goog result . Can you help me?

user1066183
  • 2,444
  • 4
  • 28
  • 57
  • What result are you actually getting? – prodigitalson Jan 12 '15 at 17:40
  • I am using belongsTo property and/or isArray property without any good result. Why my question is downvoted? I searched in StackOverflow db but no people have a good ask for this question. – user1066183 Jan 12 '15 at 17:43
  • What is the output you are actually getting? You have given us what is expected but you haven't shown us what you are currently getting. – prodigitalson Jan 12 '15 at 17:45
  • Actually I am getting no output becouse when I build the elements off the form there is no property to do my task. So I am blocked. This is a similar question http://stackoverflow.com/questions/3029532/associated-array-elements-in-zend-form/3424766#3424766 – user1066183 Jan 12 '15 at 17:48
  • An othe similar question without a clear response: http://stackoverflow.com/questions/4922304/array-input-like-name-person-in-zend-form – user1066183 Jan 12 '15 at 17:49

1 Answers1

0

I hope some of these will help on your quest.
Zend Framework: Working with Form elements in array notation
Advanced Zend_Form Usage
Zend_Form - Array based elements?
How do configure Zend_Form to use array notation?

Community
  • 1
  • 1
Nandakumar V
  • 4,317
  • 4
  • 27
  • 47