I am creating a custom component which allows the backend user to associate a content category with an record in my database table. I would like to have the same form field that is displayed throughout the backend in Joomla where the user is able to filter/search the categories in the drop down by typing.
The joomla website provides this code example:
<field name="mycategory" type="category" extension="com_content" label="Select a category" description="" />
However this only creates a standard drop-down select box that is not searchable.
Looking in 'administrator/components/com_content/models/forms/artile.xml' the category field is listed as:
<field name="catid"
type="categoryedit"
label="JCATEGORY"
description="JFIELD_CATEGORY_DESC"
required="true"
default=""
>
</field>
However this gives me a simple text box to enter the category ID into.
How can I easily get the searchable dropdown without programming it from scratch?