如何将信息放入Zend_Form中的textarea标签中?例如:
<textarea name="descNews" id="descNews" rows="5" class="txt_meta" cols="80">This is text!</textarea>
Zend表格:
$description = new Zend_Form_Element_Textarea('descNews');
$description->addFilter('StripTags')
->setAttribs(array(
'rows' => '5',
'class' => 'txt_meta'
));
答案 0 :(得分:2)
您可以使用setValue(mixed $value)
$description = new Zend_Form_Element_Textarea('descNews');
$description->addFilter('StripTags')
->setAttribs(array(
'rows' => '5',
'class' => 'txt_meta'
));
$description->setValue('set your default vallue');
或者您可以在zend doc
上看到 希望它对你有用。