JForm::load
Method to load the form description from an XML string or object.
The replace option works per field. If a field being loaded already exists in the current form definition then the behavior or load will vary depending upon the replace flag. If it is set to true, then the existing field will be replaced in its exact location by the new field being loaded. If it is false, then the new field being loaded will be ignored and the method will move on to the next field to load.
Signature
public function load(string
$data,
[string
$replace = true,
[string
$xpath = false]] )
Parameters
-
$data
- The name of an XML string or object.
-
$replace
- Flag to toggle whether form fields should be replaced if a field
-
$xpath
- An optional xpath to search for the fields.
Returns
- boolean
- True on success, false otherwise.