Skip to content

Is it possible to create two category fields in the same table with different menu categories to each of them to add new category #40766

@madanedeepali

Description

@madanedeepali

Is it possible to implement Multi-categories for other components in Joomla 4 now in 2023?
For example, in my table #__shopping_details I want to add two category fields so I added
<field name="shopping_account" extension="com_shopping.shoppingdetails" type="category" label="COM_SHOPPING_FORM_LBL_SHOPPINGDETAIL_SHO_CAT" description="COM_SHOPPING_FORM_DESC_SHOPPINGDETAIL_SHO_CAT" hint="COM_SHOPPING_FORM_LBL_SHOPPINGDETAIL_SHO_CAT"/>

<field name="shopping_item_category" extension="com_shopping.shoppingdetails" type="category" label="COM_SHOPPING_FORM_LBL_SHOPPINGDETAIL_SHOOPING_ITEM" description="COM_SHOPPING_FORM_DESC_SHOPPINGDETAIL_SHOOPING_ITEM" hint="COM_SHOPPING_FORM_LBL_SHOPPINGDETAIL_SHOOPING_ITEM"/>

But it will allow me to add categories field twice which could be achieved using multiple true instead of adding two category fields which I do not want what I want is to allow adding two category fields with different categories in it respectively so the same table will have two different categories menu to add categories in it, for example, shopping_account and shopping_item_category and will have different menus to add categories in it...is it achievable in Joomla using Category field? can someone guide me on the same?
Do I need to change extension="com_shopping.shoppingdetails" and extension="com_shopping.shoppingdetails" to something else?

@pollen8 @elkuku @dziudek

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions