library/core/class.form.php
public function TextBox($FieldName, $Attributes = FALSE) {
      if (!is_array($Attributes))
         $Attributes = array();
      
      $MultiLine = ArrayValueI('MultiLine', $Attributes);
      
      if ($MultiLine) {
         $Attributes['rows'] = ArrayValueI('rows', $Attributes, '6'); // For xhtml compliance
         $Attributes['cols'] = ArrayValueI('cols', $Attributes, '100'); // For xhtml compliance
      }
      
      // Show inline errors?
      $ShowErrors = $this->_InlineErrors && array_key_exists($FieldName, $this->_ValidationResults);
      
      $CssClass = ArrayValueI('class', $Attributes);
      if ($CssClass == FALSE) $Attributes['class'] = $MultiLine ? 'TextBox' : 'InputBox';
      
      // Add error class to input element
      if ($ShowErrors) $this->AddErrorClass($Attributes);
      
      $Return = '';
      $Wrap = GetValue('Wrap', $Attributes, FALSE, TRUE);
      if ($Wrap)
         $Return .= '<div class="TextBoxWrapper">';
      
      $Return .= $MultiLine === TRUE ? '<textarea' : '<input type="'.GetValue('type', $Attributes, 'text').'"';
      $Return .= $this->_IDAttribute($FieldName, $Attributes);
      $Return .= $this->_NameAttribute($FieldName, $Attributes);
      $Return .= $MultiLine === TRUE ? '' : $this->_ValueAttribute($FieldName, $Attributes);
      $Return .= $this->_AttributesToString($Attributes);
      
      $Value = ArrayValueI('value', $Attributes, $this->GetValue($FieldName));
      
      $Return .= $MultiLine === TRUE ? '>' . htmlentities($Value, ENT_COMPAT, 'UTF-8') . '</textarea>' : ' />';
      
      // Append validation error message
      if ($ShowErrors)  
         $Return .= $this->InlineError($FieldName);
      
      if ($Wrap)
         $Return .= '</div>';
      
      return $Return;
   }
public function TextBox($FieldName, $Attributes = FALSE) {
      if (!is_array($Attributes))
         $Attributes = array();
      
      $MultiLine = ArrayValueI('MultiLine', $Attributes);
      
      if ($MultiLine) {
         $Attributes['rows'] = ArrayValueI('rows', $Attributes, '6'); // For xhtml compliance
         $Attributes['cols'] = ArrayValueI('cols', $Attributes, '100'); // For xhtml compliance
      }
      
      // Show inline errors?
      $ShowErrors = $this->_InlineErrors && array_key_exists($FieldName, $this->_ValidationResults);
      
      $CssClass = ArrayValueI('class', $Attributes);
      if ($CssClass == FALSE) $Attributes['class'] = $MultiLine ? 'TextBox' : 'InputBox';
      
      // Add error class to input element
      if ($ShowErrors) $this->AddErrorClass($Attributes);
      
      $Return = '';
      $Wrap = GetValue('Wrap', $Attributes, FALSE, TRUE);
      if ($Wrap)
         $Return .= '<div class="TextBoxWrapper">';
      
      $Return .= $MultiLine === TRUE ? '<textarea' : '<input type="'.GetValue('type', $Attributes, 'text').'"';
      $Return .= $this->_IDAttribute($FieldName, $Attributes);
      $Return .= $this->_NameAttribute($FieldName, $Attributes);
      $Return .= $MultiLine === TRUE ? '' : $this->_ValueAttribute($FieldName, $Attributes);
      $Return .= $this->_AttributesToString($Attributes);
      
      $Value = ArrayValueI('value', $Attributes, $this->GetValue($FieldName));
      
      $Return .= $MultiLine === TRUE ? '>' . htmlentities($Value, ENT_COMPAT, 'UTF-8') . '</textarea>' : ' />';
      
      // Append validation error message
      if ($ShowErrors)  
         $Return .= $this->InlineError($FieldName);
      
      if ($Wrap)
         $Return .= '</div>';
      
      return $Return;
   }
public function TextBox ( $ FieldName , $ Attributes = FALSE ) { if ( ! is_array ( $ Attributes ) ) $ Attributes = array ( ) ; $ MultiLine = ArrayValueI ( 'MultiLine' , $ Attributes ) ; if ( $ MultiLine ) { $ Attributes [ 'rows' ] = ArrayValueI ( 'rows' , $ Attributes , '6' ) ; // For xhtml compliance $ Attributes [ 'cols' ] = ArrayValueI ( 'cols' , $ Attributes , '100' ) ; // For xhtml compliance } // Show inline errors? $ ShowErrors = $ this -> _InlineErrors && array_key_exists ( $ FieldName , $ this -> _ValidationResults ) ; $ CssClass = ArrayValueI ( 'class' , $ Attributes ) ; if ( $ CssClass == FALSE ) $ Attributes [ 'class' ] = $ MultiLine ? 'TextBox' : 'InputBox' ; // Add error class to input element if ( $ ShowErrors ) $ this -> AddErrorClass ( $ Attributes ) ; $ Return = '' ; $ Wrap = GetValue ( 'Wrap' , $ Attributes , FALSE , TRUE ) ; if ( $ Wrap ) $ Return .= '<div class="TextBoxWrapper">' ; $ Return .= $ MultiLine === TRUE ? '<textarea' : '<input type="' . GetValue ( 'type' , $ Attributes , 'text' ) . '"' ; $ Return .= $ this -> _IDAttribute ( $ FieldName , $ Attributes ) ; $ Return .= $ this -> _NameAttribute ( $ FieldName , $ Attributes ) ; $ Return .= $ MultiLine === TRUE ? '' : $ this -> _ValueAttribute ( $ FieldName , $ Attributes ) ; $ Return .= $ this -> _AttributesToString ( $ Attributes ) ; $ Value = ArrayValueI ( 'value' , $ Attributes , $ this -> GetValue ( $ FieldName ) ) ; $ Return .= $ MultiLine === TRUE ? '>' . htmlentities ( $ Value , ENT_COMPAT , 'UTF-8' ) . '</textarea>' : ' />' ; // Append validation error message if ( $ ShowErrors ) $ Return .= $ this -> InlineError ( $ FieldName ) ; if ( $ Wrap ) $ Return .= '</div>' ; return $ Return ; }
Returns the xhtml for a text-based input.

@param string $FieldName The name of the field that is being displayed/posted with this input. It
should related directly to a field name in $this->_DataArray.
@param array $Attributes An associative array of attributes for the input. ie. maxlength, onclick,
class, etc
@return string
Returns the xhtml for a text - based input .