-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add examples to use @b3.radio with boolean properties? #35
Comments
Hmm perhaps I solved it by extending, is this correct to use: @(field: play.api.data.Field, args: (Symbol,Any)*)(implicit handler: b3.B3FieldConstructor)
@b3.inputFormGroup(field, withFeedback = false, withLabelFor = true, b3.Args.withDefault(args, 'class -> "")) { fieldInfo =>
<div class="checkbox">
<label for="@fieldInfo.id">
<input type="checkbox" id="@fieldInfo.id" name="@fieldInfo.name" @if(fieldInfo.value == Some("true")){ checked } @toHtmlArgs(fieldInfo.innerArgsMap)>
</label>
</div>
} |
Sorry, but I don't understand your question. A Play will handle the Then, the following code
will be rendered as:
|
@adrianhurt Yes it works like you described. I did not know that I tried the following but that did not worked for radio inputs: I will close this issue since the real problem is my Scala knowledge 😆 |
Don't worry ;) And yes, I think you had a little confusion but not with Scala. Note that everything will be finally rendered as a simple |
Are there any examples how to use
radio
orcheckbox
with boolean properties? In the documentation I can read that the radio and checkbox only haveSeq[(String, Any)]
and thus not allowed to pass boolean.Btw: I am using your lib a Java project...
The text was updated successfully, but these errors were encountered: