herve06
Member
Hello,
I have a problem when I want to save a form with a picklist element.
I have populated the picklist with php code like in the example :
$db = FabrikWorker::getDbo(false, 6);
$db->setQuery("SELECT CODE, NAME FROM t_table ");
$rows = $db->loadObjectList();
foreach ($rows as $row) {
$options[] = JHTML::_('select.option', $row->CODE, $row->NAME);
}
return $options;
When I fill the form, the picklist is displayed correctly and I can drag elements from thr FROM list to the TO list.
However, when I save the form I have an error because instead of saving the CODE(s) of the selected option(s) it is trying to save the symbol "[".
Does someone has any idea of why I have this ? What could be my mistake or what did I forgot or missed ?
Thank you in advance for your help.
I have a problem when I want to save a form with a picklist element.
I have populated the picklist with php code like in the example :
$db = FabrikWorker::getDbo(false, 6);
$db->setQuery("SELECT CODE, NAME FROM t_table ");
$rows = $db->loadObjectList();
foreach ($rows as $row) {
$options[] = JHTML::_('select.option', $row->CODE, $row->NAME);
}
return $options;
When I fill the form, the picklist is displayed correctly and I can drag elements from thr FROM list to the TO list.
However, when I save the form I have an error because instead of saving the CODE(s) of the selected option(s) it is trying to save the symbol "[".
Does someone has any idea of why I have this ? What could be my mistake or what did I forgot or missed ?
Thank you in advance for your help.