LoginSignup
13
12

More than 5 years have passed since last update.

java play Framework FormHelperの種類

Last updated at Posted at 2016-01-22

自分用メモ :octocat:
FormHelper いつもどういうふうに書けばいいのか忘れてしまうので
使いやすいように種類をメモしておきます :green_book:
play2.4

/framework/src/play/src/main/scala/views/helper/
以下のようなHelperがあります。


Helpers.scala
form.scala.html
input.scala.html
inputCheckboxGroup.scala.html
inputDate.scala.html
inputFile.scala.html
inputPassword.scala.html
inputRadioGroup.scala.html
inputText.scala.html
jsloader.scala.html
requireJs.scala.html
select.scala.html
textarea.scala.html

例えばラジオボタンだとこんなふうに

 * Generate an HTML radio group
 *
 * Example:
 * {{{
 * @inputRadioGroup(
 *           contactForm("gender"),
 *           options = Seq("M"->"Male","F"->"Female"),
 *           '_label -> "Gender",
 *           '_error -> contactForm("gender").error.map(_.withMessage("select gender")))
 *
 * }}}

ちゃんとそれぞれのhelperについて使い方の例が載っています。

GitHubより

13
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
12