こんにちはみんな私はJoomla2.5/3でカスタムフォームフィールドタイプを開発しています。しかし、私のコードは機能しません。つまり、コードを押すと、メッセージが表示されず、IDも異なります。ここに私のコード:
{module}/elements/testfield.php
<?php
/**
* @copyright Copyright (C) 2011 Cedric KEIFLIN alias ced1870
* http://www.joomlack.fr
* @license GNU/GPL
* */
// no direct access
defined('_JEXEC') or die('Restricted access');
class JFormFieldTestfield extends JFormField {
protected $type = 'testfield';
protected function getInput() {
$document = JFactory::getDocument();
$html = '<input name="' . $this->name . '" id="xxxfffaaa" value="' . $this->value . '" onclick="" />';
return $html;
}
protected function getLabel() {
}
}
*
{module}/{module_name}.xml
...
<fields name="params">
<fieldset name="basic">
....
<field name="blablaname" type="testfield" label="this is label"/>
</fieldset>
</fields>