library/core/class.form.php
public function Input($FieldName, $Type = 'text', $Attributes = FALSE) {
      if ($Type == 'text' || $Type == 'password') {
         $CssClass = ArrayValueI('class', $Attributes);
         if ($CssClass == FALSE) $Attributes['class'] = 'InputBox';
      }
      
      // Show inline errors?
      $ShowErrors = $this->_InlineErrors && array_key_exists($FieldName, $this->_ValidationResults);
      
      // Add error class to input element
      if ($ShowErrors) 
         $this->AddErrorClass($Attributes);
      
      $Return = '';
      $Wrap = GetValue('Wrap', $Attributes, FALSE, TRUE);
      $Strength = GetValue('Strength', $Attributes, FALSE, TRUE);
      if ($Wrap) {
         $Return .= '<div class="TextBoxWrapper">';
      }
      
      if (strtolower($Type) == 'checkbox') {
         if (isset($Attributes['nohidden'])) {
            unset($Attributes['nohidden']);
         } else {
            $Return .= '<input type="hidden" name="Checkboxes[]" value="'.
               (substr($FieldName, -2) === '[]' ? substr($FieldName, 0, -2) : $FieldName).
                '" />';
         }
      }
      
      
      $Return .= '<input type="' . $Type . '"';
      $Return .= $this->_IDAttribute($FieldName, $Attributes);
      if ($Type == 'file') $Return .= Attribute('name',
         ArrayValueI('Name', $Attributes, $FieldName));
      else $Return .= $this->_NameAttribute($FieldName, $Attributes);

      if ($Strength)
         $Return .= ' data-strength="true"';
      $Return .= $this->_ValueAttribute($FieldName, $Attributes);
      $Return .= $this->_AttributesToString($Attributes);
      $Return .= ' />';
   
      
      // Append validation error message
      if ($ShowErrors && ArrayValueI('InlineErrors', $Attributes, TRUE))  
         $Return .= $this->InlineError($FieldName);
      
      if ($Type == 'password' && $Strength) {
         $Return .= <<<PASSWORDMETER
<div class="PasswordStrength">
   <div class="Background"></div>
   <div class="Strength"></div>
   <div class="Separator" style="left: 20%;"></div>
   <div class="Separator" style="left: 40%;"></div>
   <div class="Separator" style="left: 60%;"></div>
   <div class="Separator" style="left: 80%;"></div>
   <div class="StrengthText">&nbsp;</div>
</div>
PASSWORDMETER;
      }
      
      if ($Wrap)
         $Return .= '</div>';

      return $Return;
   }
public function Input($FieldName, $Type = 'text', $Attributes = FALSE) {
      if ($Type == 'text' || $Type == 'password') {
         $CssClass = ArrayValueI('class', $Attributes);
         if ($CssClass == FALSE) $Attributes['class'] = 'InputBox';
      }
      
      // Show inline errors?
      $ShowErrors = $this->_InlineErrors && array_key_exists($FieldName, $this->_ValidationResults);
      
      // Add error class to input element
      if ($ShowErrors) 
         $this->AddErrorClass($Attributes);
      
      $Return = '';
      $Wrap = GetValue('Wrap', $Attributes, FALSE, TRUE);
      $Strength = GetValue('Strength', $Attributes, FALSE, TRUE);
      if ($Wrap) {
         $Return .= '<div class="TextBoxWrapper">';
      }
      
      if (strtolower($Type) == 'checkbox') {
         if (isset($Attributes['nohidden'])) {
            unset($Attributes['nohidden']);
         } else {
            $Return .= '<input type="hidden" name="Checkboxes[]" value="'.
               (substr($FieldName, -2) === '[]' ? substr($FieldName, 0, -2) : $FieldName).
                '" />';
         }
      }
      
      
      $Return .= '<input type="' . $Type . '"';
      $Return .= $this->_IDAttribute($FieldName, $Attributes);
      if ($Type == 'file') $Return .= Attribute('name',
         ArrayValueI('Name', $Attributes, $FieldName));
      else $Return .= $this->_NameAttribute($FieldName, $Attributes);

      if ($Strength)
         $Return .= ' data-strength="true"';
      $Return .= $this->_ValueAttribute($FieldName, $Attributes);
      $Return .= $this->_AttributesToString($Attributes);
      $Return .= ' />';
   
      
      // Append validation error message
      if ($ShowErrors && ArrayValueI('InlineErrors', $Attributes, TRUE))  
         $Return .= $this->InlineError($FieldName);
      
      if ($Type == 'password' && $Strength) {
         $Return .= <<<PASSWORDMETER
<div class="PasswordStrength">
   <div class="Background"></div>
   <div class="Strength"></div>
   <div class="Separator" style="left: 20%;"></div>
   <div class="Separator" style="left: 40%;"></div>
   <div class="Separator" style="left: 60%;"></div>
   <div class="Separator" style="left: 80%;"></div>
   <div class="StrengthText">&nbsp;</div>
</div>
PASSWORDMETER;
      }
      
      if ($Wrap)
         $Return .= '</div>';

      return $Return;
   }
public function Input ( $ FieldName , $ Type = 'text' , $ Attributes = FALSE ) { if ( $ Type == 'text' || $ Type == 'password' ) { $ CssClass = ArrayValueI ( 'class' , $ Attributes ) ; if ( $ CssClass == FALSE ) $ Attributes [ 'class' ] = 'InputBox' ; } // Show inline errors? $ ShowErrors = $ this -> _InlineErrors && array_key_exists ( $ FieldName , $ this -> _ValidationResults ) ; // Add error class to input element if ( $ ShowErrors ) $ this -> AddErrorClass ( $ Attributes ) ; $ Return = '' ; $ Wrap = GetValue ( 'Wrap' , $ Attributes , FALSE , TRUE ) ; $ Strength = GetValue ( 'Strength' , $ Attributes , FALSE , TRUE ) ; if ( $ Wrap ) { $ Return .= '<div class="TextBoxWrapper">' ; } if ( strtolower ( $ Type ) == 'checkbox' ) { if ( isset ( $ Attributes [ 'nohidden' ] ) ) { unset ( $ Attributes [ 'nohidden' ] ) ; } else { $ Return .= '<input type="hidden" name="Checkboxes[]" value="' . ( substr ( $ FieldName , - 2 ) === '[]' ? substr ( $ FieldName , 0 , - 2 ) : $ FieldName ) . '" />' ; } } $ Return .= '<input type="' . $ Type . '"' ; $ Return .= $ this -> _IDAttribute ( $ FieldName , $ Attributes ) ; if ( $ Type == 'file' ) $ Return .= Attribute ( 'name' , ArrayValueI ( 'Name' , $ Attributes , $ FieldName ) ) ; else $ Return .= $ this -> _NameAttribute ( $ FieldName , $ Attributes ) ; if ( $ Strength ) $ Return .= ' data-strength="true"' ; $ Return .= $ this -> _ValueAttribute ( $ FieldName , $ Attributes ) ; $ Return .= $ this -> _AttributesToString ( $ Attributes ) ; $ Return .= ' />' ; // Append validation error message if ( $ ShowErrors && ArrayValueI ( 'InlineErrors' , $ Attributes , TRUE ) ) $ Return .= $ this -> InlineError ( $ FieldName ) ; if ( $ Type == 'password' && $ Strength ) { $ Return .=  <<<PASSWORDMETER
<div class="PasswordStrength">
   <div class="Background"></div>
   <div class="Strength"></div>
   <div class="Separator" style="left: 20%;"></div>
   <div class="Separator" style="left: 40%;"></div>
   <div class="Separator" style="left: 60%;"></div>
   <div class="Separator" style="left: 80%;"></div>
   <div class="StrengthText">&nbsp;</div>
</div>
PASSWORDMETER ; } if ( $ Wrap ) $ Return .= '</div>' ; return $ Return ; }
Returns the xhtml for a standard input tag.

@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 string $Type The type attribute for the input.
@param array $Attributes An associative array of attributes for the input. (e.g. maxlength, onclick, class)
Setting 'InlineErrors' to FALSE prevents error message even if $this->InlineErrors is enabled.
@return string
Returns the xhtml for a standard input tag .