Welcome Guest, Not a member yet? Register   Sign In
Table class - add XHTML attributes to add_row()

CI noob here. Is there any way to add attributes to the table elements, for example:

                form_checkbox('checkbox_'.$user->id, $user->id),
                date('Y-m-d', strtotime($user->last_login)),
                date('Y-m-d', strtotime($user->created))

I need to add styling to some or all of the cells, for example:

<td class="checkbox-cell-style">&lt;input type="checkbox" name="checkbox_1" value="1" /&gt;&lt;/td><td>Display_Name</td>...

Is there any way to do this?

Try reading http://ellislab.com/codeigniter/user-gui...table.html - "Changing the Look of Your Table" is the section you want specifically, "Set_template" should also be checked into.

After those I would look for a pre-existing Table class extension (perhaps in the Wiki, or do a google search) or jump into writing your own class extension.

I think I would probably just pass some data into a view, and grab the returned data. It's much more powerful, and just as simple. I think the table class was designed with simple tables in mind.

Theme © iAndrew 2016 - Forum software by © MyBB