In Play 2.0 Scala application I have simple page with Form with one parameter. It redirects to another page, where I want to do something with parameter from the form. How can I get it?
I’m looking for something like
request.formData.get("paramName")
I know request.body, but still don’t know how to get single parameter value from it.
I’d say that the easyest way to retrieve forms data is to use the
Formstructure inplay.api.data. So here is how you could do it in play2.0-rc1Instead of using
nonEmptyTextyou might useof[String].Check what is put in your hands for that mapping here Forms Helper.
Some other information that should help you further are here.