php - Zend Framework 默认值形式

标签 php zend-framework zend-form

您好,我正在使用 zend 框架来做我的应用程序 我想做的是为 Zend_form_element_text 设置一个默认值

我想要的是,当我启动 .phtm 页面时,文本区域中已经有一个可见的默认值。用户可以保留或更改该值。

我尝试执行 $name->setValue 但它不起作用...

最佳答案

使用表单setDefaults

$form->setDefaults(array('name' => 'some value'));

关于php - Zend Framework 默认值形式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10163052/

相关文章:

php - Zend GData Contacts PHP,添加联系人 SSL 错误

zend-framework2 - ZF2 fatal error : Class 'Locale' not found in/home/. ..../Zend/I18n/Translator/Translator.php 第 228 行

zend-framework - Zend Framework:使用数组符号形式的表单元素

PHP file_get_contents 超时 "local file"(NFS/挂载)

php - PHP 中的 "Hello, World"什么都不显示

php - 防止在php中使用相同的登录凭据进行多次登录

php - 如何在 sql 查询中使用数据映射器

php - Zend框架如何保持表单先前的值

zend-framework - Zend Framework ACL 角色和模块

zend-framework - 为什么使用 zend 表单装饰器而不是单独渲染?