In order to add some customized fields in the user form I builded
a profile plugin as described here
http://docs.joomla.org/Creating_a_profile_plugin
So in the onContentPrepareForm function, When I load my form from the xml file (profiles/profile.xml) it works right.
Code: Select all
JForm::addFormPath(dirname(__FILE__).'/profiles');
$form->loadFile('profile', false);
I tried to store the content of the xml file in a php variable:
Code: Select all
$myprofile = '<?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="myprofile">
<fieldset name="myprofile"
label="PLG_USER_MY_PROFILE_SLIDER_LABEL" >
...
</form>';
Code: Select all
$form->loadFile($myprofile, false);
Can someone tells me where the problem comes from ?
Thanks