簡體   English   中英

從控制器以zend形式設置文本框的值並顯示該形式

[英]Set the value of textbox in a zend form from a controller and display the form

我有一個Zend表單,其中有很多文本框。 我需要從相應的控制器設置這些文本框的值,並在執行操作時顯示表單。 我怎樣才能達到相同的效果?

嘗試像這樣使用:

$form = new Zend_From();
$textfield = new Zend_Form_Element_Text('textfield');
$textfield->setValue('your value');
$form->addElement($textfield);

<?= $form ?>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM