Back to FormField class

Method getFieldName

protected string
getFieldName
(mixed $fieldName)
Method to get the field name used.
Parameters
  • string $fieldName The field element name.
Returns
  • string The field name
Since
  • 1.7.0
Class: FormField
Project: Joomla

Method getFieldName - Source code

/**
 * Method to get the field name used.
 *
 * @param   string  $fieldName  The field element name.
 *
 * @return  string  The field name
 *
 * @since   1.7.0
 */
protected function getFieldName($fieldName)
{
    if ($fieldName) {
        return $fieldName;
    } else {
        self::$count = self::$count + 1;
        return self::$generated_fieldname . self::$count;
    }
}