Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Unchecked checkbox behavior question #504
Let's say I have a "sticky" Boolean represented by a checkbox. Checking the checkbox should mark it as
I'm asking because in my current implementation, leaving the checkbox unchecked when inserting a document leaves the property unset, but doing the same when editing a document marks it as
It's one of those tricky issues. Since normal check box behavior is "include the value with the submission if checked", that doesn't really help us when using it to represent a boolean value. My preference is for it always to be
So this is basically an implementation detail of the "boolean-checkbox" input type. As you can see, it's returning the checked state, which I thought would always be either
added a commit
Dec 13, 2014
@aldeed I'm getting an issue where two seemingly identical collections have a boolean field with
@aramk, the Products form is calling
This is a bit difficult to parse, but it seems to me that it should be retaining the checked state on reset. It's possible this is an issue that could be fixed in Blaze, but you'd have to recreate the issue without autoform involved. Autoform is simply calling form.reset(), so I'm hesitant to do any specific overrides of that behavior.
All of that being said, I don't think there's any reason why you should have to reset the form on render.