@repeat extremely useful; however, I hit the road block with nested forms.
I need to create a form for a game schedule that has 2 attributes, schedule information (game date, time, place, opponent) and sending team notes (for example, "due to a winter storm, the game on January 7 was rescheduled for January 9 at .. . Hawaii ;-) ")
Form mapping is based on:
case class Schedule( composite: Seq[Composite], note: Seq[ScheduleNote] )
and then display the form in the template that I have:
@repeat(_form("composite"), min=numGames) { f=> @inputDate(f("gameDate"), 'id-> "gameDate", '_label-> "Game Date") .... } @repeat(_form("note"), min=numGames) { f=> @inputDate(f("gameNote"), '_label-> "Game Notes") .... }
Of course, game notes must be paired with game data, which will not be in the above, since it seems to me that I need @repeat composite game data and notes separately.
It would be really, really nice: @repeat(_form("composite").zip(_form("note")), min=numGames) { case(fc,fn)=>
over nested form elements.
Anyway, can I take it off? If you look at the source , this is not so, but it is possible with my library's pimp (or, since I'm building against 2.1, hack something in until the environment supports what seems to be a limitation)