Class
FormItem

Defines the FormItem component.

Definition

Constructors

FormItem()

Declaration

cs-api-definition
public FormItem()

Properties

Class

Defines the class that will be added to the topmost element of the form item.

Declaration

cs-api-definition
[Parameter]
public string Class { get; set; }

Property Value

string

Implements IFormItem.Class

ColSpan

Defines the col span of the grid css layout of the form.

Declaration

cs-api-definition
[Parameter]
public int ColSpan { get; set; }

Property Value

int

Implements IFormItem.ColSpan

EditorType

Defines the editor used for the given field. If not provided, a default editor will be used based on the field data type.

Declaration

cs-api-definition
[Parameter]
public FormEditorType? EditorType { get; set; }

Property Value

FormEditorType?

Implements IFormItem.EditorType

Enabled

Defines whether the form item should be enabled. Default value is true.

Declaration

cs-api-definition
[Parameter]
public bool Enabled { get; set; }

Property Value

bool

Implements IFormItem.Enabled

Field

Defines the name of the field of the form item.

Declaration

cs-api-definition
[Parameter]
public string Field { get; set; }

Property Value

string

Implements IFormItem.Field

FieldType

Defines the field type of the item if it cannot be taken with reflection.

Declaration

cs-api-definition
[Parameter]
public Type FieldType { get; set; }

Property Value

Type

Implements IFormItem.FieldType

Hint

Defines the hint displayed below the form editor, that gives more instruction to the user. If the field is invalid, error message is displayed instead of the hint.

Declaration

cs-api-definition
[Parameter]
public string Hint { get; set; }

Property Value

string

Implements IFormItem.Hint

Id

Defines the id of the form editor that will be rendered. Useful for associating the label.

Declaration

cs-api-definition
[Parameter]
public string Id { get; set; }

Property Value

string

Implements IFormItemBase.Id

LabelText

Defines the label of the item. Takes precedence over the DisplayAttribute of the property.

Declaration

cs-api-definition
[Parameter]
public string LabelText { get; set; }

Property Value

string

Implements IFormItem.LabelText

Template

Defines the template of the form item. No label, form component or validation elements will be rendered by the form.

Declaration

cs-api-definition
[Parameter]
public RenderFragment Template { get; set; }

Property Value

RenderFragment

Implements IFormItem.Template

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

Dispose()

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides ComponentBase.OnInitialized()

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides ComponentBase.SetParametersAsync(ParameterView)