【发布时间】:2012-07-30 10:34:12
【问题描述】:
我正在尝试在 Joomla 中构建一个组件,我希望一个项目属于多个类别。
每当我在 xml 表单中选择 ]multiple=multiple 并提交表单时,catid 都会设置为零。
//this is the code
<code section>
<field
name="catid"
multiple="multiple"
type="category">
<option value="0">JOPTION_SELECT_CATEGORY</option>
</field>
How do I achieve that?
Secondly where is code to insert catid values in db.
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_xyz.edit.xyz.data', array());
if (empty($data))
{
$data = $this->getItem();
}
print_r($data);
return $data;
}
谁能帮帮我...
【问题讨论】:
标签: components joomla2.5