protected function setDefaultPlaceholder(&$fieldData) {
		
		if(!is_array($fieldData) 
			|| empty($fieldData[0][1]) /* 'textField' */
			|| !is_array($fieldData[1]) /* ($model, $attribute, $htmlOptions) */
		)
			return;
			
		$model = $fieldData[1][0];
		if(!$model instanceof CModel)
			return;
		
		$attribute = $fieldData[1][1];
		if(!empty($fieldData[1][3]) && is_array($fieldData[1][3])) {
			/* ($model, $attribute, $data, $htmlOptions) */
			$htmlOptions = &$fieldData[1][3];
		} else {
			/* ($model, $attribute, $htmlOptions) */
			$htmlOptions = &$fieldData[1][2];
		}
		if (!isset($htmlOptions['placeholder'])) {
			$htmlOptions['placeholder'] = $model->getAttributeLabel($attribute);
		}
		
	}
protected function setDefaultPlaceholder(&$fieldData) {
		
		if(!is_array($fieldData) 
			|| empty($fieldData[0][1]) /* 'textField' */
			|| !is_array($fieldData[1]) /* ($model, $attribute, $htmlOptions) */
		)
			return;
			
		$model = $fieldData[1][0];
		if(!$model instanceof CModel)
			return;
		
		$attribute = $fieldData[1][1];
		if(!empty($fieldData[1][3]) && is_array($fieldData[1][3])) {
			/* ($model, $attribute, $data, $htmlOptions) */
			$htmlOptions = &$fieldData[1][3];
		} else {
			/* ($model, $attribute, $htmlOptions) */
			$htmlOptions = &$fieldData[1][2];
		}
		if (!isset($htmlOptions['placeholder'])) {
			$htmlOptions['placeholder'] = $model->getAttributeLabel($attribute);
		}
		
	}
protected function setDefaultPlaceholder ( & $ fieldData ) { if ( ! is_array ( $ fieldData ) || empty ( $ fieldData [ 0 ] [ 1 ] ) /* 'textField' */ || ! is_array ( $ fieldData [ 1 ] ) /* ($model, $attribute, $htmlOptions) */ ) return ; $ model = $ fieldData [ 1 ] [ 0 ] ; if ( ! $ model instanceof CModel ) return ; $ attribute = $ fieldData [ 1 ] [ 1 ] ; if ( ! empty ( $ fieldData [ 1 ] [ 3 ] ) && is_array ( $ fieldData [ 1 ] [ 3 ] ) ) { /* ($model, $attribute, $data, $htmlOptions) */ $ htmlOptions = & $ fieldData [ 1 ] [ 3 ] ; } else { /* ($model, $attribute, $htmlOptions) */ $ htmlOptions = & $ fieldData [ 1 ] [ 2 ] ; } if ( ! isset ( $ htmlOptions [ 'placeholder' ] ) ) { $ htmlOptions [ 'placeholder' ] = $ model -> getAttributeLabel ( $ attribute ) ; } }
Sets default placeholder value in case of CModel attribute depending on attribute label

@param array|string $fieldData Pre-rendered field as string or array of arguments for call_user_func_array() function.
Sets default placeholder value in case of CModel attribute depending on attribute label