I have a problem with my code.
I am currently loading my list of accounts through a database and generating a table with Codeigniters library, table.
$this->load->library('table');
$this->db->select('firstname, lastname, accountname, registerdate, birthdate, email');
$this->db->from('accounts');
$query = $this->db->get();
$template = array('table_open' => '<table class="table table-striped table-hover">');
$headings = array( 'Fornavn', 'Efternavn', 'Brugernavn', 'Registeringsdato', 'Fødselsdag', 'Email');
$this->table->set_template($template);
$this->table->set_heading($headings);
return $this->table->generate($query);
I would like a modal to open when clicking on the table row. My only headtwister is how I pass any data, like userid, to the modal opened? I can change the table template to open a modal but I cannot figure out how to pass the data. Since the data should be an id which changes from row to row, if you catch my drift.
I hope theres some smart brain out there who can help me!
Best regards OrKarstoft