Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play framework: is there a way to avoid strange form helper syntax?

I am trying to build a form with Play Framework 2, the usual syntax is:

@helper.form(action = routes.Application.submit, 'id -> "myForm") {   
}

Note that the single quotation mark is before id is opened and never closed.

Is there another syntax that I can use to do the same thing?

like image 245
Vitaly Olegovitch Avatar asked Feb 10 '23 18:02

Vitaly Olegovitch


1 Answers

The 'id is a Symbol.

You could use the Symbol("sym") syntax if you don't like this one, but it is not standard.

scala> 'symbol == Symbol("symbol")
res0: Boolean = true
like image 144
Marth Avatar answered Feb 13 '23 21:02

Marth