1
votes

I made a custom component in Joomla 2.5, and I need to reference custom tables to form a select dropdown in the "Menu Manager: Edit Menu Item" page.

I know that the default.xml in the component view is where the fields should reside.

Joomla uses this XML across many of their components to grab categories from the DB:

<field name="id" type="category"
               description="JGLOBAL_CHOOSE_CATEGORY_DESC"
               extension="com_content"
               label="JGLOBAL_CHOOSE_CATEGORY_LABEL"
               required="true"
                />

And what appears is the first label/field below. What I want to do is grab information from the DB to populate a second dropdown (carousels).

Joomla uses a category sitewide to grab the categories from the DB, but how to do a custom one?

How can I create my own logic to have my "Choose a carousel" field grab information from a table in the DB?

1

1 Answers

2
votes

Most probably your answer is in the Joomla! documentation, but tell us if not after checking this http://docs.joomla.org/Creating_a_custom_form_field_type#An_example_custom_field_type

I presume this is what you're looking for.