Table library and form input box |
[eluser]pisio[/eluser]
Hey evryone, Im here with my stupid question and my bad english.Sorry for that :d I get from mysql results: Code: function getTopLinks() { Code: Array ( [0] => stdClass Object ( [id] => 1 [url] => / [value] => Home [is_admin] => 0 [position] => 0 [visable] => 0 ) [1] => stdClass Object ( [id] => 2 [url] => # [value] => Created by Preslav Panayotov [is_admin] => 1 [position] => 1 [visable] => 0 ) [2] => stdClass Object ( [id] => 3 [url] => /users/index [value] => Login [is_admin] => 0 [position] => 0 [visable] => 1 ) [3] => stdClass Object ( [id] => 4 [url] => /users/register [value] => Register [is_admin] => 0 [position] => 0 [visable] => 1 ) [4] => stdClass Object ( [id] => 5 [url] => /users/logout [value] => Logout [is_admin] => 0 [position] => 0 [visable] => 2 ) [5] => stdClass Object ( [id] => 6 [url] => /video/random [value] => Random Video [is_admin] => 0 [position] => 0 [visable] => 0 ) [6] => stdClass Object ( [id] => 7 [url] => /video/upload [value] => Upload video [is_admin] => 0 [position] => 0 [visable] => 2 ) [7] => stdClass Object ( [id] => 8 [url] => /capanel/admin/index [value] => Admin Panel [is_admin] => 0 [position] => 1 [visable] => 3 ) [8] => stdClass Object ( [id] => 9 [url] => /capanel/admin/links [value] => Edit Links [is_admin] => 1 [position] => 0 [visable] => 3 ) ) And I'm printing table with : Code: echo $this->table->generate($this->AdminEditLinks->linksForEdit); Its cool. But here it is my question: How i can make input with name url / value / is_admin / position / visable? I dont wanna make it with foreach and make for everyone inputbox. Thank you in advance.
[eluser]theprodigy[/eluser]
are you asking how you can remove the id column from the table and leave the rest of the columns?
[eluser]theprodigy[/eluser]
Quote:I dont wanna make it with foreach and make for everyone inputbox. I don't think you can do this without using a foreach, unless you wanna do it in a way that is not really all that wise, and change your query to include returning text for that column. Code: select '<input type="text" name="whatever" />' as input, url, value, is_admin, position, visible
|
Welcome Guest, Not a member yet? Register Sign In |