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

Create button inside PropertyVM

ivansoriabia opened this issue · comments

Hello!

How I can do to create a button in an PropertyVM. I have tried the answer that Harry posted in this issue but I have no idea about how to create a button in XElement.

Please how I can make a button inside a PropertyVM, using XElement (or not using it if it's not done with XElement)?

Thanks a lot.

I think you should be able to do this:

	new PropertyVm(typeof(XElement), "number")
	{
		DisplayName = "A button",		
		Value = XElement.Parse("<button name='foo' />"), //or whatever html you want there
	}

Thank You!

I have done it like you have said and it's working as expected, so I will close this issue.