質問

When I have errors in my form, it seems that my @repeat field will be repeated as many times as there is different form input into the @repeat block.

@inputText(formUser("birth"), 'label -> "Birth", 'placeholder -> "Birth", 'class -> "datepicker")

@repeat(formUser("places"), min = 1) { stayField =>
 <div id="groupLocationField">
   @select(formUser(stayField.name.toString + ".place.id"), options(Place.options), 'label -> "Places", '_default -> "--- Choose a country ---")
   @inputDate(formUser(stayField.name.toString + ".startDate"), 'label -> "Start Date", 'placeholder -> "Start Date")
   @inputDate(formUser(stayField.name.toString + ".endDate"), 'label -> "End Date", 'placeholder -> "End Date")
 </div>
}

In my case, when my Birth input is wrong I will have each stayField displayed 3 times.

Anyone has encounter this issue ?

EDIT: Example: https://github.com/milkeg/PlayFramwork/tree/master/repeatField

EDIT 2: I started this discussion on the Play Framework forum: https://groups.google.com/forum/#!topic/play-framework/eE2bpHMVDDg

役に立ちましたか?

解決

Answer from Play framework forum : https://groups.google.com/forum/#!topic/play-framework/eE2bpHMVDDg

It is a bug in Play version 2.2.2 version. The 2.2.3 has fixed :).  Take a look in this pull request => https://github.com/playframework/playframework/pull/2499
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top