-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?

5
  • What result are you actually getting? Commented Jan 12, 2015 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. Commented Jan 12, 2015 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. Commented Jan 12, 2015 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 stackoverflow.com/questions/3029532/… Commented Jan 12, 2015 at 17:48
  • An othe similar question without a clear response: stackoverflow.com/questions/4922304/… Commented Jan 12, 2015 at 17:49

1 Answer 1

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?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.