Re: Joomla Component Development in 2.5 version

199 views
Skip to first unread message

Elin Waring

unread,
Jul 30, 2012, 1:56:49 PM7/30/12
to joomla-de...@googlegroups.com

Hi Prashant,

You will get much better advice by posting on the general development list. This list is for talking about developing the Joomla platform not building applications.


Elin

On Monday, July 30, 2012 6:34:32 AM UTC-4, Prashant Sudeep wrote:
I am trying to build a component in Joomla 2.5
I have to 2 tabs Items and Categories
I have created 5 categories.

What I want is whenever I create a new item I want all 5 categories to be selected

How do save all catid to that particular item.??

Whenever I select ]multiple=multiple in xml form, and Submit the form, catid is set to zero.
<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;
}


Can any help me???


Regards
Prashant

Prashant Sudeep

unread,
Jul 31, 2012, 2:13:44 AM7/31/12
to joomla-de...@googlegroups.com
thanks a lot Elin
Reply all
Reply to author
Forward
0 new messages