CodeIgniter Forums
checkbox column - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: checkbox column (/showthread.php?tid=69506)



checkbox column - FARUKB13 - 12-06-2017

How do I make an extra column with checkboxes in a generated table?


Code:
$template = array(
        'table_open'            => '<table border="1" cellpadding="4" cellspacing="0">',

        'thead_open'            => '<thead>',
        'thead_close'           => '</thead>',

        'heading_row_start'     => '<tr>',
        'heading_row_end'       => '</tr>',
        'heading_cell_start'    => '<th>',
        'heading_cell_end'      => '</th>',

        'tbody_open'            => '<tbody>',
        'tbody_close'           => '</tbody>',

        'row_start'             => '<tr>',
        'row_end'               => '</tr>',
        'cell_start'            => '<td>',
        'cell_end'              => '</td>',

        'row_alt_start'         => '<tr>',
        'row_alt_end'           => '</tr>',
        'cell_alt_start'        => '<td>',
        'cell_alt_end'          => '</td>',

        'table_close'           => '</table>'
            );

        
           $this->table->set_template($template);
                return $this->table->generate($query);

Thanks in advance Smile


RE: checkbox column - InsiteFX - 12-06-2017

Once the Table is built you cannot add to it with out using JavaScript.

You can see the CodeIgniter Users Guide's - HTML Table Library for info.

It has methods for adding headers, rows and columns.


RE: checkbox column - FARUKB13 - 12-06-2017

(12-06-2017, 08:14 AM)InsiteFX Wrote: Once the Table is built you cannot add to it with out using JavaScript.

You can see the CodeIgniter Users Guide's - HTML Table Library for info.

It has methods for adding headers, rows and columns.

Oh I didn't know that.  Thanks!