Good morning everybody. Thanks in advance for helping me out.
I have a form where people need to ask for a workpermit.
I have a table & form called workpermit
I have a table called workpermit_detail and both are linked with a join.
On the form I want to have multiple groups. Here comes the problem.
Whatever I do a new group gives me a new table. ...repeat. I want the data of all groups stored in my workpermit details table.
So I have three elements: action responsible person status
All possible actions are stored in one table. These actions are divided in three groups which people need to choose while filling in the form. I have everything working except that each group is stored in a identical database. Is it possible to change this to one (workpermit_detail)?
In each group I have a dropdown with:
$db = JFactory::getDbo();
$db->setQuery('SELECT id, action FROM workpermit WHERE type = 1'); //type could be 1 - 2 or 3 for the groups
$rows = $db->loadObjectList();
foreach ($rows as $row) {
$options[] = JHTML::_('select.option', $row->id, $row->action);
}
return $options;
Thanks in advance.
I have a form where people need to ask for a workpermit.
I have a table & form called workpermit
I have a table called workpermit_detail and both are linked with a join.
On the form I want to have multiple groups. Here comes the problem.
Whatever I do a new group gives me a new table. ...repeat. I want the data of all groups stored in my workpermit details table.
So I have three elements: action responsible person status
All possible actions are stored in one table. These actions are divided in three groups which people need to choose while filling in the form. I have everything working except that each group is stored in a identical database. Is it possible to change this to one (workpermit_detail)?
In each group I have a dropdown with:
$db = JFactory::getDbo();
$db->setQuery('SELECT id, action FROM workpermit WHERE type = 1'); //type could be 1 - 2 or 3 for the groups
$rows = $db->loadObjectList();
foreach ($rows as $row) {
$options[] = JHTML::_('select.option', $row->id, $row->action);
}
return $options;
Thanks in advance.