I have used the joomla docs to make a hello world plugin and then again the joomla docs to load the plugin within the joomla banners component.

I cant seem to load the extra tabs inside the banner edit view in the admin?

My helloworld.php

// no direct access
defined('_JEXEC') or die;

class plgContentHelloworld extends JPlugin
     * Load the language file on instantiation.
     * Note this is only available in Joomla 3.1 and higher.
     * If you want to support 3.0 series you must override the constructor
     * @var boolean
     * @since 3.1
    protected $autoloadLanguage = true;
    function onContentPrepareForm($form, $data) {
        $app = JFactory::getApplication();
        $option = $app->input->get('option');
        switch($option) {
            case 'com_banners':
                if ($app->isAdmin()) {
                    JForm::addFormPath(__DIR__ . '/forms'); // this is the path to the xml file
                    $form->loadFile('bannerfields', false); // this is the xml file
                    echo '<h1>Youre in the banners edit view!</h1>'; // this works
                return true;
        return true;


My helloworld.xml

<?xml version="1.0" encoding="utf-8"?>
<extension version="3.0" type="plugin" group="content">
        <license>GNU General Public License</license>
                <filename plugin="helloworld">helloworld.php</filename>


<?xml version="1.0" encoding="utf-8"?>
   <fields name="params">
        <fieldset name="extrafields" label="Extra content">
            <field name="numero" type="text" size="50" default="" label="Example field" description=""  class="inputbox" labelclass="control-label"  />

       <fieldset name="extrafields2" label="Extra content 2">
            <field name="example1" type="text" size="100" default="" label="Example 1" description="" class="inputbox" labelclass="control-label" />
            <field name="example2" type="text" size="100" default="" label="Example 2" description="" class="inputbox" labelclass="control-label" />
            <field name="example3" type="text" size="100" default="" label="Example 3" description="" class="inputbox" labelclass="control-label" />
            <field name="example4" type="text" size="100" default="" label="Example 4" description="" class="inputbox" labelclass="control-label" />

Thanks in advance :) John

1 Answer 1


Actually not an answer, but some research shows that: If you rename fields name to attribs like:

<fields name="attribs">

you can add the additional tabs (with fields) in most of the component forms:

  • com_templates.style
  • com_categories.categorycom_content
  • com_categories.categorycom_contact
  • com_contact.contact com_menus.item
  • etc...

You can add them even in com_categories.categorycom_banners, but this is not the case with com_banners.banner. It is possible to have here bug in Joomla! - see here (though only guess)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.