JForm::getFieldAttribute
Method to get an attribute value from a field XML element. If the attribute doesn't exist or is null then the optional default value will be used.
Signature
public function getFieldAttribute(string
$name,
[string
$attribute = null,
[mixed
$default = null,
[string
$group = null]]] )
Parameters
-
$name
- The name of the form field for which to get the attribute value.
-
$attribute
- The name of the attribute for which to get a value.
-
$default
- The optional default value to use if no attribute value exists.
-
$group
- The optional dot-separated form group path on which to find the field.
Returns
- mixed
- The attribute value for the field.
Errors/Exceptions
-
UnexpectedValueException