madcorp / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

position of input in crud form #847

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
I want to change the order of inputs in my crud form , my form was generated 
automatically, so how i can set the position of a input ? thanks for help

Please insert the appropriate values;
                    Zend Framework version:1.11
ZFDatgrid Version (Bvb_Grid::getVersion()):0.8
                          Operating system:xp
                               PHP Version:5.3
               Database Server and version:ms5
                          Source Adatapter:doctrine

Please provide any additional information below.

Original issue reported on code.google.com by madani...@gmail.com on 11 Apr 2012 at 3:48

GoogleCodeExporter commented 9 years ago
Hi
I explaine again , for example i have a table like this 
Id | first name | last name | age 
if my crud form the order of the inputs is like 
label_id           :   input_id
first_name_label   :   first_name inupt 
last name label    :   last name  input
age label          :   age input 

So my question is how i can change the position of input like to display, for 
ex, the last name before first name , as such this

label_id           :   input_id
last name label    :   last name  input
first_name_label   :   first_name inupt 
age label          :   age input 

thank you

Original comment by madani...@gmail.com on 12 Apr 2012 at 3:52

GoogleCodeExporter commented 9 years ago
Hi,

Try this:

$form->getElement('last_name')->setOrder(2);

If don't work as expected, force order for all elements.

Best Regards
Ivo Monteiro

Original comment by ivomonte...@gmail.com on 15 Apr 2012 at 2:09

GoogleCodeExporter commented 9 years ago
thank you it works like 

$grid->getForm(1)->getElement('last_name')->setOrder(2);

Original comment by madani...@gmail.com on 16 Apr 2012 at 12:30

GoogleCodeExporter commented 9 years ago

Original comment by ivomonte...@gmail.com on 16 Apr 2012 at 2:17