I have 2 tables, teams and students.
Then 2 pivot tables, turnups and teamstudents
On my teams item page, I’m listing the pivot table teamstudents. All of this is working.
Now I would like a button next to each student, and when clicked it should add data to the turnups table.
I’m a bit stuck here
My button looks like this
<td>
<?php echo JDom::_('html.link', array(
'commandAcl' => array('core.edit.own', 'core.edit'),
'content' => 'Turnup',
'num' => $rel->id,
'task' => 'team.turnup'
));?>
</td>
Controller -> team.php
protected function turnup($data = array(), $key = id) {
}
Model -> team.php
public function turnup($data) {
}
I have tried to create a send mail in controller and model function, but nothing happens, so I’m guessing the functions are never really called. What I’m I missing?
Any help is appreciated.