protected function getName($fieldName)
	{
		$name = '';

		// If there is a form control set for the attached form add it first.
		if ($this->formControl)
		{
			$name .= $this->formControl;
		}

		// If the field is in a group add the group control to the field name.
		if ($this->group)
		{
			// If we already have a name segment add the group control as another level.
			$groups = explode('.', $this->group);

			if ($name)
			{
				foreach ($groups as $group)
				{
					$name .= '[' . $group . ']';
				}
			}
			else
			{
				$name .= array_shift($groups);

				foreach ($groups as $group)
				{
					$name .= '[' . $group . ']';
				}
			}
		}

		// If we already have a name segment add the field name as another level.
		if ($name)
		{
			$name .= '[' . $fieldName . ']';
		}
		else
		{
			$name .= $fieldName;
		}

		// If the field should support multiple values add the final array segment.
		if ($this->multiple)
		{
			$name .= '[]';
		}

		return $name;
	}
protected function getName($fieldName)
	{
		$name = '';

		// If there is a form control set for the attached form add it first.
		if ($this->formControl)
		{
			$name .= $this->formControl;
		}

		// If the field is in a group add the group control to the field name.
		if ($this->group)
		{
			// If we already have a name segment add the group control as another level.
			$groups = explode('.', $this->group);

			if ($name)
			{
				foreach ($groups as $group)
				{
					$name .= '[' . $group . ']';
				}
			}
			else
			{
				$name .= array_shift($groups);

				foreach ($groups as $group)
				{
					$name .= '[' . $group . ']';
				}
			}
		}

		// If we already have a name segment add the field name as another level.
		if ($name)
		{
			$name .= '[' . $fieldName . ']';
		}
		else
		{
			$name .= $fieldName;
		}

		// If the field should support multiple values add the final array segment.
		if ($this->multiple)
		{
			$name .= '[]';
		}

		return $name;
	}
protected function getName ( $ fieldName ) { $ name = '' ; // If there is a form control set for the attached form add it first. if ( $ this -> formControl ) { $ name .= $ this -> formControl ; } // If the field is in a group add the group control to the field name. if ( $ this -> group ) { // If we already have a name segment add the group control as another level. $ groups = explode ( '.' , $ this -> group ) ; if ( $ name ) { foreach ( $ groups as $ group ) { $ name .= '[' . $ group . ']' ; } } else { $ name .= array_shift ( $ groups ) ; foreach ( $ groups as $ group ) { $ name .= '[' . $ group . ']' ; } } } // If we already have a name segment add the field name as another level. if ( $ name ) { $ name .= '[' . $ fieldName . ']' ; } else { $ name .= $ fieldName ; } // If the field should support multiple values add the final array segment. if ( $ this -> multiple ) { $ name .= '[]' ; } return $ name ; }
Method to get the name used for the field input tag.

@param   string  $fieldName  The field element name.

@return  string  The name to be used for the field input tag.

@since   1.0
Method to get the name used for the field input tag .