好的,我有一个带有另一个嵌入式表单的表单。在 actions.php 我有:
...
// add extra field - select for dynamic population
$tempFrm = new SbCarteOpTempForm(array(), array('type' => 'transfer'));
$tempFrm->setWidget('inv_selectate',new sfWidgetFormSelectMany(array('choices' => array())));
$tempFrm->setValidator('inv_selectate', new sfValidatorPass());
$tempFrm->setWidget('status',new sfWidgetFormInputHidden(array(),array('value'=>'pending')));
$tempFrm->setValidator('status', new sfValidatorPass());
额外的字段“inv_selectate”和“status”应该包含在显示的表单中,确实如此。但是当我尝试提交表单时,只发送状态变量,选择元素不是(inv_selectate)。
为什么会这样?我真的没有看到问题(这两个新添加的字段之间的区别也没有。
谢谢。