I have added a custom field in article creation page but it gets displayed in-between the option tab but I need the field to be displayed between Title and alias field.
Here is my code which I did refering https://docs.joomla.org/Adding_custom_fields_to_the_article_component
Rating.php
<?php
//$xml = simplexml_load_file("multiurlredirect.xml");
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport( 'joomla.plugin.plugin' );
jimport( 'joomla.form.form' );
class plgsystemrating extends JPlugin
{
public function __construct(& $subject, $config)
{
parent::__construct($subject, $config);
}
public function onContentPrepareForm($form, $data)
{
if (!($form instanceof JForm))
{
$this->_subject->setError('JERROR_NOT_A_FORM');
return false;
}
JFormHelper::addFormPath(dirname(__FILE__) . '/rating');
$form->loadFile('rating', true);
return true;
}
}
rating.xml
<config>
<fields name="params">
<fieldset name="primaryfieldset">
<field
name="ratingclass_sfx"
type="text"
label="Rating Class"
description="Optional CSS class to add to the rating. This allows CSS styling specific to the page."
/>
</fieldset>
</fields>
</config>
rating/rating.xml
<fields name="attribs">
<fieldset name="primaryfieldset" label="Rating Options">
<field
name="texture"
type="text"
id="texture"
description="What does the sample feel like"
label="Texture"
message="PLG_CONTENT_RATING_FIELD_TEXTURE_MESSAGE"
size="30"
/>
</fieldset>
</fields>
I need the Rating option to be displayed in between the title and alias field.
Please any one explain me how to do this