hi all,
i am making a form that the elements in it changes dynamically, so i am
adding the addEelement part in a loop
it looks like this :
$this->addElements(array($child_gender.'##'.$k, $birthdate_day.'##'.$k,
$birthdate_month.'##'.$k, $birthdate_year.'##'.$k));
where $k is the number of the loop.
when i do this, i get the following error :
exception 'Zend_Form_Exception' with message 'Elements specified by string
must have an accompanying name' in
/Library/WebServer/Documents/cha/library/Zend/Form.php:805 Stack trace: #0
/Library/WebServer/Documents/cha/library/Zend/Form.php(896):
Zend_Form->addElement('##addElements(Array) #2
/Library/WebServer/Documents/cha/application/default/controllers/SubmittedCVsController.php(138):
SubmittedCVWizard2Form->__construct() #3
/Library/WebServer/Documents/cha/library/Zend/Controller/Action.php(502):
SubmittedCVsController->add2Action() #4
/Library/WebServer/Documents/cha/library/Zend/Controller/Dispatcher/Standard.php(293):
Zend_Controller_Action->dispatch('add2Action') #5
/Library/WebServer/Documents/cha/library/Zend/Controller/Front.php(914):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http)) #6
/Library/WebServer/Documents/cha/html/index.php(51):
Zend_Controller_Front->dispatch() #7 {main}
any help ??
--
Ahmed Abdel-Aliem