Method to set a field XML element to the form definition. If the replace flag is set then the field will be set whether it already exists or not. If it isn't set, then the field will not be replaced if it already exists.
Signature
public function setField(SimpleXMLElement
$element,
[string
$group = null,
[boolean
$replace = true]] )
Parameters
$element
The XML element object representation of the form field.
$group
The optional dot-separated form group path on which to set the field.
$replace
True to replace an existing field if one already exists.