我已经将一个长的一页表单分成了多个子表单,预计它将在项目生命周期的后期被拆分为一个多页表单。我在下面的 Identical 验证器中遇到了令牌 var 的问题。
从 Application_Form 对象:
$authorizedIndividual = new Zend_Form_SubForm();
// .. authorizedName text element setup here
$termsAgree = new Zend_Form_SubForm();
// Add termsAgree
$termsAgree->addElement('text', 'termsAgree', array(
'label' => 'By typing your name in the preceding field, you, as the authorized individual agree to etc. etc. etc.',
'class' => 'termsAgree',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array(
array('validator' => 'Identical', true, $authorizedIndividual->authorizedName )
)
));