- Go to your xml and add the "addrulepath" attribute to the form tag:
- [form addfieldpath="/templates/yourTemplate/html/mod_qlform/fields"] - if you put in your template you might edit it via template administration - OR
- [form addfieldpath="/modules/mod_qlform/php/fields"] - only editable by ftp, no access by template, more secure
- Add the field into your form: [field name="someFieldName" type="Yyyyy" /] - ideally you use a more transparent name like "commentary";-)
- Add your field file into this path, code is as follows:
<?php
defined('_JEXEC') or die;
jimport('joomla.html.html');
//import the necessary class definition for formfield
jimport('joomla.form.formfield');
class JFormFieldYyyyy extends JFormField
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
protected $type = 'yyyyy'; //the form field type see the name is the same
/**
* Method to retrieve the lists that resides in your application using the API.
*
* @return array The field option objects.
* @since 1.6
*/
protected function getInput()
{
$options = array();
$html='';
$html.='<textarea style="width:400px;height:400px;" name="'.$this->name.'" id="'.$this->id.'">';
$html.=$this->value;
$html.='</textarea>';
return $html;
}
}