On Mon, Jul 30, 2012 at 11:26 PM, Elin Waring <elin.war
...@gmail.com> wrote:
> 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.
> https://groups.google.com/forum/?fromgroups#!forum/joomla-dev-general
> 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