inputCheckboxGroup
views.html.helper.inputCheckboxGroup
object inputCheckboxGroup extends BaseScalaTemplate[Appendable, Format[Appendable]], Template5[Field, Seq[(String, String)], Array[(Symbol, Any)], FieldConstructor, MessagesProvider, Appendable]
Attributes
- Graph
-
- Supertypes
-
trait Template5[Field, Seq[(String, String)], Array[(Symbol, Any)], FieldConstructor, MessagesProvider, Appendable]class BaseScalaTemplate[Appendable, Format[Appendable]]trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Self type
-
inputCheckboxGroup.type
Members list
Value members
Concrete methods
def apply(field: Field, options: Seq[(String, String)], args: (Symbol, Any)*)(implicit handler: FieldConstructor, messages: MessagesProvider): Appendable
Generate an HTML checkbox group
Generate an HTML checkbox group
Example:
@inputCheckboxGroup(
contactForm("hobbies"),
options = Seq("S" -> "Surfing", "R" -> "Running", "B" -> "Biking","P" -> "Paddling"),
Symbol("_label") -> "Hobbies",
Symbol("_error") -> contactForm("hobbies").error.map(_.withMessage("select one or more hobbies")))
Value parameters
- args
-
Set of extra HTML attributes.
- field
-
The form field.
- handler
-
The field constructor.
- options
-
Sequence of options as pairs of value and HTML
Attributes
def f: (Field, Seq[(String, String)], Array[(Symbol, Any)]) => (FieldConstructor, MessagesProvider) => Appendable
def render(field: Field, options: Seq[(String, String)], args: Array[(Symbol, Any)], handler: FieldConstructor, messages: MessagesProvider): Appendable
In this article