Created
April 7, 2016 20:03
-
-
Save dgrammatiko/ec0e2afe879c5d07ffadd2c8a639e1a7 to your computer and use it in GitHub Desktop.
Insert the part from desc.xml to the module/plugin/template xml and create a folder field and copy the file testing.php inside it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<field name="testone" class="" type="testone" default="0" | |
label="test one" | |
description="test one" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('JPATH_BASE') or die; | |
JFormHelper::loadFieldClass('list'); | |
class JFormFieldTestOne extends JFormFieldList | |
{ | |
protected $type = 'TestOne'; | |
public function getOptions() | |
{ | |
$x = array ( | |
0 => array( | |
'value' => '0', | |
'text' => 'test', | |
), | |
1 => array( | |
'value' => '1', | |
'text' => 'test', | |
), | |
); | |
return array_merge(parent::getOptions(), $x); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment