You could work around it with an implicit conversion. This will require using a scala source file, though (seems like you're using java, but you can mix them).
app/libs/SymbolImplicits.scala
package example.libs
object SymbolImplicits {
implicit def string2Symbol[A](s: (String, A)): (Symbol, A) = (Symbol(s._1), s._2)
}
Then in your view you would @import example.libs.SymbolImplicits._
, so you can then do:
@helper.form(action = routes.Application.submit, "id" -> "myForm") {
}
"id" -> "myForm"
is then implicitly converted to 'id -> "myForm"
.
To avoid using that import in every view, you could also add this line to build.sbt
(or in Build.scala
project properties) instead:
TwirlKeys.templateImports += "example.libs.SymbolImplicits._"