Found the solution. Documenting it here in case anyone else stumbles into this issue:
You need to use an alternative format to specify the model/field names: <? echo $form->dateTime("[a][b][c][d]") ?> Thanks to the person on IRC who hinted at this solution :-) On Jan 24, 4:17 pm, RichardAtHome <richardath...@gmail.com> wrote: > Hate to do this, but... Bump! > > Is this a bug in CakePHP (I'd be surprised if it was as I can't fault > the rest of CakePHP's code) or expected behaviour? > > On Jan 23, 3:39 pm, RichardAtHome <richardath...@gmail.com> wrote: > > > Hi all > > > I've hit a snag I'm hoping someone can help with. Perhaps one of the > > devs can explain this behaviour? > > > <? echo $form->dateTime("a.b.c") ?> > > > generates (as expected): > > > <select name="data[a][b][c][day]" id="abCDay">... > > > whereas: > > > <? echo $form->dateTime("a.b.c.d") ?> > > > generates: > > > <select name="data[a]" id="a">... > > > and > > > <? echo $form->dateTime("a.b.c.d.e") ?> > > > generates > > > <select name="data[]" id="">... > > > Unfortunately, I'm building a dynamic search form and my code needs 4 > > levels: > > > $form->dateTime("{$model}.nextIndex.{$field_id}.value", "DMY", "NONE") > > > (nextIndex is replaced with a number at runtime) > > > I've just tried this with a basic text field <?echo $form->text > > ("a.b.c.d.e) ?> and got the same results as above. > > > What do I do? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---