I created a plugin to add a custom field following this answer. Works fine when I am logged in the backend and edit the article but the tab is not displaying when the article is being edited from the front. Am I missing something here or do I have to do it like the docs mention here
Plugin XML:
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fields name="attribs" >
<fieldset name="custom" >
<field name="full_article_image_overlay"
type="editor"
filter="safehtml"
buttons="true"
label="PLG_FULL_ARTILCE_IMAGE_TEXT"
/>
</fieldset>
</fields>
</form>
Plugin PHP:
function onContentPrepareForm($form, $data) {
$app = JFactory::getApplication();
$option = $app->input->get('option');
switch($option) {
case 'com_content':
if ($app->isAdmin()) {
JForm::addFormPath(__DIR__ . '/forms');
//Show specific forms based on categories
$form->loadFile('content', false);
}
return true;
}
return true;
}
}
Stored Data in 'attribs' column
{
"show_title": "",
"link_titles": "",
"show_tags": "",
"show_intro": "",
"info_block_position": "",
"show_category": "",
"link_category": "",
"show_parent_category": "",
"link_parent_category": "",
"show_author": "",
"link_author": "",
"show_create_date": "",
"show_modify_date": "",
"show_publish_date": "",
"show_item_navigation": "",
"show_icons": "",
"show_print_icon": "",
"show_email_icon": "",
"show_vote": "",
"show_hits": "",
"show_noauth": "",
"urls_position": "",
"alternative_readmore": "",
"article_layout": "",
"show_publishing_options": "",
"show_article_options": "",
"show_urls_images_backend": "",
"show_urls_images_frontend": "",
"full_article_image_overlay": "<p>Test Test<\/p>"
}