Re: Zend_Form: How to change positions of elements ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux