mcintyre321 / FormFactory

MVC5, Core or standalone - Generate rich HTML5 forms from your ViewModels, or build them programatically

Home Page:http://formfactoryaspmvc.azurewebsites.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SelectListItem or similar to populate PropertyVM DropDown

ivansoriabia opened this issue · comments

Hello!

I'm using FormFactory in ASP .NET Core to create a form dynamically. I have to add a PropertyVM that will be a DropDown. In this DropDown I have to set the value of each option.

Before using FormFactory, I had all the options in an IList but when I add this IList in an PropertyVM then It cannot render the form.

**So there is a way to do the same that I was doing with SelectListItem in an PropertyVM?

Here you have the IList that I'm using (it's written in VB, but I think you will understand it easily):

Dim Sexo As IList(Of SelectListItem) =  New List(Of SelectListItem) From {
            New SelectListItem With {.Text = "Masculino",  .Value = "M"},
            New SelectListItem With {.Text = "Femenino",  .Value = "F"}
}

Thank You!

I have found this issue that shows how to do what I want to do, so I close this issue.