quickform textarea->value

SA739

Cogito, ergo sum
quickform textarea->value

доброго времени

или я чего-то не понимаю или одно из двух
PHP:
$form->addElement('text', 'floor', 'Floor', array('size' => 10, 'maxlength' => 255, 'value' => get_value($info, 'floor');
$form->addElement('textarea', 'note', 'Notes', array('cols' => 41, 'rows' => 4, 'value' => 'qwe qw'));
с text все ок, тобишь велью в хтмл добавляется..
с текстарией хоть ты тресни - болт и все тут..

просветите пожалуйста где я обшибся
 

DimbIch

Новичок
попробуй через $form->setDefaults();

у тега textarea нет атрибута value просто
 

SA739

Cogito, ergo sum
как тода понимать код из класса textarea
PHP:
    function toHtml()
    {
        if ($this->_flagFrozen) {
            return $this->getFrozenHtml();
        } else {
            return $this->_getTabs() .
                   '<textarea' . $this->_getAttrString($this->_attributes) . '>' .
                   // because we wrap the form later we don't want the text indented
                   preg_replace("/(\r\n|\n|\r)/", '&#010;', htmlspecialchars($this->_value)) .
                   '</textarea>';
        }
    } //end func toHtml
??


зы. с setDefaults() получилось, спасибо
 
Сверху