Re: [fw-general] Zend_Form and arrays

2009-10-24 Thread Peter Warnock
2009/10/22 Krzysztof Szatanik z...@gazeta.ie As you can see even if i get form values in request as i wanted, they aren't recognized by Zend_Form. Output of $form-getValues() is different from expected, and even fields aren't recognized, so i can use Zend_Form only to generate HTML form but

Re: [fw-general] Zend_Form and arrays

2009-10-24 Thread Shaun Farrell
Your Zend_Form is a POST method. You can also do it this way in your controller. $form = new Default_Form_FormName(); // instantiate the form $this-view-form = $form; // form for the view //after submitting the form if($this-getRequest()-isPost()) { // if the form is a post $formData =

[fw-general] Zend_Form and arrays

2009-10-22 Thread Krzysztof Szatanik
Hi I have some issues with Zend_Form and getting values as arrays. For example - i have 2 elements - e1 and e2 and i want them as array (arr): Something like this: [arr] = Array ( [e1] = val1 [e2] = val2 ) Closest form design i can get is

Re: [fw-general] Zend_Form and arrays

2009-10-22 Thread Jules Piccotti
I think you need to add this to your form: $form-setIsArray(true); If you then access (that's what I do) the form values in a controller like that: $this-getRequest()-getPost('arr') ...you should get the expected array. Just take care that you have to set the form name to match the expected