4
최근에 양식 및 하위 양식 작업 중입니다.동일한 유형의 여러 하위 양식 추가
나는 다음 만들었습니다
$experience->addSubForm(new Application_Form_Experience(), '0');
$experience->addSubForm(new Application_Form_Experience(), '1');
: 나는 다음과 같은 시도 할 때
$form = new Application_Form_Cv();
$experience = new Zend_Form_SubForm();
$form->addSubForm($experience, 'experience');
내가
$form->addSubForm($experience, 'experience');.
에 요소 내 배열에 'experience'
감사를해야합니까 그 객체는 스스로 덮어 쓴다. 나는 오직 하나의 '경험'요소만을 얻고 0과 1은 존재하지 않는다.
array (
'controller' => 'cv',
'action' => 'index',
'module' => 'default',
'CvName' => 'Cv Ingenieur informatique',
'LanguageCode' => 'fr',
'UserID' => '2',
'experience' =>
array (
'CompanyName' => 'Mondial Assistance Ltd',
'From' => '2002',
'Until' => '2009',
'Current' => '1',
),
'submit' => 'Save CV',
)
Zend_Form_Subforms
만 배열에 새 키를 만듭니다.