atk4 / atk4

PHP framework for developing powerful web applications. Inspired by desktop toolkits (QT, Cocoa, .NET). For developers with any skill level.
http://agiletoolkit.org/
MIT License
182 stars 83 forks source link

Form_Field_Hidden doesn't render properly #74

Closed DarkSide666 closed 12 years ago

DarkSide666 commented 12 years ago

/atk4/lib/Form/Field.php, class Form_Field_Hidden, function render()

HTML output of hidden form field somehow gets HTML sanitized and as result show "HTML code" of element in page.

This is how you can reproduce this bug:

class page_index extends Page {
    function init(){
        parent::init();
        $p = $this;

        $f = $p->add('Form');
        $f->addField('hidden','test field'); // This shows as [and]lt; input name="..." type="hidden"...etc [and]gt;
    }
}

When I remove render() function overwrite from class Form_Field_Hidden at all, then output renders correctly.

romaninsh commented 12 years ago

I've tested with the recent version of atk and works fine:

DarkSide666 commented 12 years ago

It's OK recent version. I was using version 4.2.1 downloaded from ATK4 website.