Welcome Guest, Not a member yet? Register   Sign In
Question about HTML Table Class
#1

[eluser]R_Nelson[/eluser]
I have a list of 7000+ karaoke songs table is like this ID,Song_name,Artist im using the table class to display them what i would like to do is replace the ID row with a checkbox using the ID for the checkbox value is this possible or do i need to make my own table?
#2

[eluser]theprodigy[/eluser]
The HTML Table class accepts an array for the rows, so just make sure your id column contains the html needed for the checkbox instead of just the id.
Code:
$data = array(
             array('ID','Song_name','Artist'),
             array('<input type="checkbox" name="song_id" value=".$song->id.">', 'My Awesome Song', 'Me'),
             );
// or use the form helper
$data = array(
             array('ID','Song_name','Artist'),
             array(form_checkbox('song_id',$song_id), 'My Awesome Song', 'Me'),
             );




Theme © iAndrew 2016 - Forum software by © MyBB