Closed RedX2501 closed 8 years ago
There's nothing built-in for 3rd party extensions, but you could write your own extension method easily enough. It looks like the input is derived from the model property name, you'd just need to suffix it with the zero-based index of the item you wish to check.
When using MvcCheckBoxList (http://mvccbl.com/) the generated html code looks like:
(line breaks added by me for clarity)
This is inside a form and generated with
@Html.CheckBoxListFor(m => m.PostedSelectedUsers, mm => mm.AllUsers, mm => mm.Id, mm => mm.DisplayName, mm => mm.Users)
Using
FindFormFor<Controller>().Field(f => f.PostedSelectedUsers)
fails because there is no input namedPostedSelectedUsers
.Does SpecsFor.Mvc provide any facilities for handling this?