[PHP] Zend_Form: How to change positions of elements ?

2008-09-30 Thread Nilesh Govindrajan
Hi,

I am new to Zend Framework.

I would like to know how to change the positions of elements created using 
Zend_Form. 

I mean that how do I place two elements one near other instead of in a 
top-down manner ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Zend_Form: How to change positions of elements ?

2008-09-30 Thread Thodoris



Hi,

I am new to Zend Framework.

I would like to know how to change the positions of elements created using 
Zend_Form. 

I mean that how do I place two elements one near other instead of in a 
top-down manner ?


  


Since I am also new to Zend Framework and I am having the same 
difficulties with Zend_Form I am asking you to suggest the proper mail list.


I am going to post here anyway what I need and if anyone can help this 
could be really a relief.



I have a controller that has a two functions like this:

public function getForm() {


$form = new Zend_Form();
$form-setAction('/clients/find')
-setMethod('post')
-addDecorators($decorators)
-setAttrib('id','formSearchClient')
-addElement('text','Name')
-addElement('text','NIN')
-addElement('text','IdNo')
-addElement('submit','?');
return $form-render();

}

public function indexAction() {

}

public function searchAction() {
$this-view-html = $this-getForm();
}


And inside the view I wrote something like this:


?php
require 'header.phtml';

print $this-html;

require 'footer.phtml';
?

My problem is that I want to put the form into a table where every form 
element is going to take two cells one for the label and one for the input.


I am trying to use ViewHelpers instead of writing html directly but I 
can't do this right and I am going through the manual again and again 
without any success. The table is started before in the header.phtml but 
I will have to put td and tr tags some way.


Any suggestions will be much of a help or even some good book 
recommendations for the framework.


Thank you for taking the time reading this.

--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php