src/Mvc/View/Controls/Form.php
private function renderFields($rendered, $fields)
    {
        foreach ($fields as $field) {
            if (! isset($field['name'])) {
                throw new ControlException("Field must have at least a name!");
            }
            $fieldType = isset($field['type']) ? $field['type'] : 'text';
            $id = isset($field['id']) ? $field['id'] : $field['name'];
            $class = isset($field['class']) ? $field['class'] : $field['name'];
            
            $rendered .= sprintf('<input type="%s" id="%s" class="%s" name="%s"/>',
            		$fieldType, $id, $class, $field['name']);
        }
        
        return $rendered;
    }
private function renderFields($rendered, $fields)
    {
        foreach ($fields as $field) {
            if (! isset($field['name'])) {
                throw new ControlException("Field must have at least a name!");
            }
            $fieldType = isset($field['type']) ? $field['type'] : 'text';
            $id = isset($field['id']) ? $field['id'] : $field['name'];
            $class = isset($field['class']) ? $field['class'] : $field['name'];
            
            $rendered .= sprintf('<input type="%s" id="%s" class="%s" name="%s"/>',
            		$fieldType, $id, $class, $field['name']);
        }
        
        return $rendered;
    }
Render the field elements

@param string $rendered
The rendered output
@param array $fields
The list of fields
@throws ControlException

@return string Rendered fields appended to rendered output