Skip to content

How do I set the initial checked value of a checkbox? #4043

Answered by logaretm
mcarlson64 asked this question in Q&A
Discussion options

You must be logged in to vote

value="true" sets the active value to a string with value "true". Try doing this instead:

:value="true" which will make the field receive the boolean as a checked value.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@mcarlson64
Comment options

Answer selected by mcarlson64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants