|
Problems with subForms: msg#00186php.zend.framework.mvc
For an event registration I need a registration form n-times, as n is the count of sessions or subevents of a main event. I build an form template for one session with Zend_Form_SubForm. The result is: <dt> </dt><dd><fieldset id=""><dl> <dt><label for="EVENT_ID" class="optional">Veranstaltung</label></dt> <dd> <select name="EVENT_ID" id="EVENT_ID" class=""> ...options... </select></dd> </dl></fieldset></dd> Then I create an empty form with Zend_Form and add the n SubForms to it: foreach($aSessions as $aSession) { $oForm->addSubForm($oSubForm, 'session_'.$aSession['EVENT_ID']); } What I get ist: all Subforms will have the same Id: <form enctype="application/x-www-form-urlencoded" action="event/registration/addtosession/event/11/part/3" method="post"><dl class="zend_form"> <dt> </dt><dd><fieldset id="session_16"><dl> <dt><label for="EVENT_ID" class="optional">Veranstaltung</label></dt> <dd> <select name="session_16[EVENT_ID]" id="EVENT_ID" class=""> ... options ... </select></dd> </dl></fieldset></dd> <dt> </dt><dd><fieldset id="session_16"><dl> <dt><label for="EVENT_ID" class="optional">Veranstaltung</label></dt> <dd> <select name="session_16[EVENT_ID]" id="EVENT_ID" class=""> ... options ... </select></dd> </dl></fieldset></dd> ... <dt> </dt><dd> <input type="submit" name="submit_btn" id="submit_btn" value="SUMIT"></dd></dl></form> What do I wrong? Thank you Axel -- View this message in context: http://www.nabble.com/Problems-with-subForms-tp18751896p18751896.html Sent from the Zend MVC mailing list archive at Nabble.com. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Proper way to change view script within controller action?: 00186, Ralf Eggert |
|---|---|
| Next by Date: | Re: Serializing Zend_Form elements with array notation: 00186, Matthew Weier O'Phinney |
| Previous by Thread: | Proper way to change view script within controller action?i: 00186, Ralf Eggert |
| Next by Thread: | Re: Problems with subForms: 00186, Matthew Weier O'Phinney |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |