2012-07-30 98 views
0

我想在Joomla中構建一個組件,我希望項目在多個類別中。如何在joomla中的項目中添加mutilple類別2.5

無論何時我選擇] multiple = multiple in xml form,並提交表單,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; 
    } 

誰能幫我在這...

回答

相關問題