Return to Snippet

Revision: 35051
at November 1, 2010 22:02 by harikaram


Initial Code
$param = new JParameter('audioPath=/media/user/test.mp3');
$xml = & JFactory::getXMLParser('Simple');
$node = new JSimpleXMLElement( 'root', array()); 
$node->addChild( 'param', array(
		'type' => 'filelist',
		'label'=>'Audio',
		'name' => 'audioPath',
		'default' => '',
		'directory' => '/media/user/42daycourse',
		'hide_default' => false,
		'exclude' =>'(pdf|flv)'						
));
$param->setXml( $node );
echo $param->render('formitemNamePrefix');

Initial URL

                                

Initial Description
For instance when you want to leverage the JElements in a admin view form...

Initial Title
Use JParameter to manually write a form field item

Initial Tags
forms, xml, joomla

Initial Language
PHP