1

プロジェクトのライフサイクルの後半で複数ページのフォームに分割されることを想定して、長い 1 ページのフォームをサブフォームに分割しました。以下の同一バリデーターのトークン変数に問題があります。

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 )
    )
));
4

1 に答える 1