HtmlHelperExtensions.EditorsForModel Method

Namespace:
Weavy.Web.Extensions
Assembly:
Weavy.Web.dll

EditorsForModel(HtmlHelper, object, string, bool, bool, bool, IEnumerable, IEnumerable)

Returns an HTML input field for each property in the model.

public static MvcHtmlString EditorsForModel(this HtmlHelper html, object model = null, string group = null, bool formGroups = true, bool formLabels = true, bool formText = true, IEnumerable<string> include = null, IEnumerable<string> exclude = null)

Parameters

html
System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

model
object

The object for which to render input fields, null to render input fields for the current model.

group
string

The name of the group for which to return input fields, null to return input fields for properties without GroupName in the model.

formGroups
bool

true to wrap the label and input field in .form-group, otherwise false

formLabels
bool

true to render labels for input fields, otherwise false

formText
bool

true to render help text for input fields, otherwise false

include
System.Collections.Generic.IEnumerable

Names of properties that should be rendered, null to include all properties.

exclude
System.Collections.Generic.IEnumerable

Names of properties that should not be rendered, null includes all properties.

Returns

System.Web.Mvc.MvcHtmlString

An HTML input element for each property in the model.