> object is used, so whichever sub form name is registered last wins. Try
> this instead:
>
> foreach($aSessions as $aSession) {
> $clone = clone $oSubForm;
> $oForm->addSubForm($clone, 'session_'.$aSession['EVENT_ID']);
> }
>
This works, but regardless things go wrong.
<form enctype="application/x-www-form-urlencoded"
action="event/registration/addtosession/event/11/part/1" method="post"><dl
class="zend_form">
<dt> </dt><dd><fieldset id="session_13"><dl>
<dt><label for="session_13-EVENT_ID"
class="optional">Veranstaltung</label></dt>
<dd>
<select name="session_13[EVENT_ID]" id="session_13-EVENT_ID" class="">
...
</select></dd>
<dt><label for="session_13-ACCOMPANIED_BY" class="em3
optional">ACCOMPANIED_BY</label></dt>
<dd>
<input type="text" name="session_13[ACCOMPANIED_BY]"
id="session_13-ACCOMPANIED_BY" value="" class="em3"></dd>
<dt><label for="session_13-COMPANIONS"
class="optional">COMPANIONS</label></dt>
<dd>
<textarea name="session_13[COMPANIONS]" id="session_13-COMPANIONS" class=""
rows="4" cols="40"></textarea></dd></dl></fieldset></dd>
<dt> </dt><dd>
<fieldset id="session_14"><dl>
<dt><label for="session_13-EVENT_ID"
class="optional">Veranstaltung</label></dt>
<dd>
<select name="session_14[EVENT_ID]" id="session_13-EVENT_ID" class="">
....
</select></dd>
<dt><label for="session_13-ACCOMPANIED_BY" class="em3
optional">ACCOMPANIED_BY</label></dt>
<dd>
<input type="text" name="session_14[ACCOMPANIED_BY]"
id="session_13-ACCOMPANIED_BY" value="" class="em3"></dd>
<dt><label for="session_13-COMPANIONS"
class="optional">COMPANIONS</label></dt>
<dd>
<textarea name="session_14[COMPANIONS]" id="session_13-COMPANIONS" class=""
rows="4" cols="40"></textarea></dd></dl></fieldset></dd>
<dt> </dt>
<dd><fieldset id="session_15"><dl>
<dt><label for="session_13-EVENT_ID"
class="optional">Veranstaltung</label></dt>
<dd>
<select name="session_15[EVENT_ID]" id="session_13-EVENT_ID" class="">
....
</select></dd>
<dt><label for="session_13-ACCOMPANIED_BY" class="em3
optional">ACCOMPANIED_BY</label></dt>
<dd>
<input type="text" name="session_15[ACCOMPANIED_BY]"
id="session_13-ACCOMPANIED_BY" value="" class="em3"></dd>
<dt><label for="session_13-COMPANIONS"
class="optional">COMPANIONS</label></dt>
<dd>
<textarea name="session_15[COMPANIONS]" id="session_13-COMPANIONS" class=""
rows="4" cols="40"></textarea></dd></dl></fieldset></dd>
<dt> </dt><dd><fieldset id="session_16"><dl>
<dt><label for="session_13-EVENT_ID"
class="optional">Veranstaltung</label></dt>
<dd>
<select name="session_16[EVENT_ID]" id="session_13-EVENT_ID" class="">
...
</select></dd>
<dt><label for="session_13-ACCOMPANIED_BY" class="em3
optional">ACCOMPANIED_BY</label></dt>
<dd>
<input type="text" name="session_16[ACCOMPANIED_BY]"
id="session_13-ACCOMPANIED_BY" value="" class="em3"></dd>
<dt><label for="session_13-COMPANIONS"
class="optional">COMPANIONS</label></dt>
<dd>
<textarea name="session_16[COMPANIONS]" id="session_13-COMPANIONS" class=""
rows="4" cols="40"></textarea></dd></dl></fieldset></dd></dl></form>
--
View this message in context: http://www.nabble.com/Problems-with-subForms-tp18751896p18756017.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论