i am making a simple content plugin using the joomla 3 docs.
However i want more than 1 tab to appear.
here are my main files. Plugin is installed an runs succesfully but only one tab will ever appear.
extras.php
// no direct access
defined ( '_JEXEC' ) or die ( 'Restricted access' );
class plgContentExtras extends JPlugin {
// the language file would have to go into languages folder
protected $autoloadLanguage = true;
function onContentPrepareForm($form, $data) {
$app = JFactory::getApplication();
$option = $app->input->get('option');
switch($option) {
case 'com_content':
if ($app->isAdmin()) {
JForm::addFormPath(__DIR__ . '/forms');
$form->loadFile('extras', true);
}
return true;
}
return true;
}
}
forms/extras.xml
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fields name="params">
<fieldset name="params" label="Map" >
<field
name="mapinfo"
type="text"
label="Map Info"
/>
</fieldset>
<fieldset name="params" label="eBlast" >
<field
name="eblastinfo"
type="text"
label="Eblast Info"
/>
</fieldset>
</fields>
</form>
Thanks to anyone in advance for your help :)
ps: i am a novice to this.
I did also try adding an extra $form->loadFile('eblast', true);
to the extras.php file and then creating an extra file called eblast.xml within the forms/ folder but that didnt work either.