/**
* Method to get the label for a field input.
*
* @param string $name The name of the form field.
* @param string $group The optional dot-separated form group path on which to find the field.
*
* @return string The form field label.
*
* @since 1.7.0
*/
public function getLabel($name, $group = null)
{
// Attempt to get the form field.
if ($field = $this->getField($name, $group)) {
return $field->label;
}
return '';
}