public function generateField($name, $attr = array())
    {
        $tag = 'input';

        if (in_array($attr['type'], $this->customGenerate)) {
            $tag = $attr['type'];
        }
        $attr['name'] = $this->transformName($name);

        $attr = $this->getData($name, $attr);

        if ($tag !== 'input') {
            $generate = 'generate' . ucfirst(strtolower($tag)) . 'Field';
            return $this->{$generate}($attr);
        } else {
            return $this->Html->tag('input', $attr);
        }
    }