Add htmlFor parameter to label element
JohannesOehm opened this issue · 2 comments
JohannesOehm commented
Currently, you have to do:
checkBoxInput(classes = "form-check-input", name = "myName") {
id = "myId"
value = "myValue"
}
label(classes="myclass") {
htmlFor="myId"
+"Check me"
}
However, a label
without for
attribute is not very common. It should be a parameter, so that it is much more concise to write:
label(classes = "myclass", htmlFor = "myId") {
+"Check me"
}
martinstender commented
Can't you just go:
label (classes = "") { attributes["for"] = "myId" +"Check me" }
?
JohannesOehm commented
thats my first solution, but written without linebreak.