I'm not sure if i've come across a bug, or if my usage of the Forms API is incorrect.
I am able to create forms, and have the data populated in the DB as I would expect, But I am seeing some funky behaviour regarding checkboxes. For example :
Func<IShapeFactory, dynamic> form =
shape => Shape.Form(
Id: "icecream", Name: "icecream",
Title: T("Do you want Ice Cream?")
will render a checkbox, and when the user saves the form, the database saves it like:
so when you go to edit the form again, the checkbox will never be selected as in the DefaultFormManager class of Orchard.Forms the BindValue method appears to be trying to compare the value "on" to true?
shape.Checked = Convert.ToString(value.AttemptedValue) == Convert.ToString(shape.Value);
I assume the same issue exists for Radio buttons...
So my question is, Am I missing something in my setup of the Form in the code, or is this a bug in Forms API?
Any and all assistance would be most appreciated.