FormControl Blazor API

FormControl Properties

NameTypeDefaultDescription
ActionFormControlActionFormControlAction.Gets or Sets the FormControl Action. This property is used when the 'controlType' is 'button' or 'submit'
AlignFormControlAlignFormControlAlign.LeftSets or Gets the alignment of the FormControl
AppendHTMLobjectHTML Content displayed after the Form Control
ControlOptionsobjectJSON object with initialization properties of the UI component. Example: { dataSource: ['item 1', 'item 2', 'item 3'] } will set the dataSource property of the Form control.
ControlTypeFormControlControlTypeFormControlControlType.InputThe type of the control.
Columnsint1Sets the Form Group columns.
ColumnSpanint1Sets the Form control column span.
DataFieldstring""Sets the Form control data field. The control's inner input's name is set to the dataField value and in the FormGroup it is accessible through the dataField value.
DisabledboolfalseSets the Form control disabled mode.
DirtyboolfalseGets whether the Form control is 'dirty' i.e its value is changed by the user.
Infostring""Gets or Sets the Form control's info icon's tooltip.
InvalidboolfalseGets whether the Form control is invalid.
Labelstring""Gets or Sets the Form control's label.
LabelPositionFormControlLabelPositionFormControlLabelPosition.LeftGets or Sets the Form control's label position.
LabelOffsetint10Gets or Sets the offset between the label and the control.
LabelAlignFormControlAlignFormControlAlign.LeftFormGroup only(when controlType is set to 'group'). Gets or Sets whether the navigation buttons are displayed. The property has effect when the viewMode property is set.
NextButtonLabelstring"Next"FormGroup only(when controlType is set to 'group'). Gets or Sets the next button label.
BackButtonLabelstring"Back"FormGroup only(when controlType is set to 'group'). Gets or Sets the back button label.
Placeholderstring""Gets or Sets the FormControl placeholder.
PrependHTMLobjectHTML Content displayed before the Form Control
ReadonlyboolfalseGets or Sets the Form control readonly mode.
RequiredboolfalseGets or Sets whether this field is required.
UntouchedboolfalseGets whether the Form control is not touched by the user. This flag is changed usually on blur, after the user interacted with the Form control
ShowColonAfterLabelboolfalseGets or Sets whether colon is displayed after the label.
ShowButtonsboolfalseFormGroup only(when controlType is set to 'group'). Gets or Sets whether the navigation buttons are displayed. The property has effect when the viewMode property is set.
ValueobjectN/ASets or Gets the Form control or Form group value.
ValidboolfalseGets whether the Form control is valid.
ValidationRulesIEnumerable<object>N/ASets or gets the column's validation rules. The expected value is an Array of Objects. Each object should have a 'type' property that can be set to 'required', 'min', 'max', 'minLength', 'maxLength', 'email', 'null', 'requiredTrue', 'minData', 'maxDate', 'pattern'. The 'value' property should be set, too. For validation rule types 'required', 'requiredTrue' and 'null' you can skip the 'value' property. Optional property is 'message', which determines the error message.
ViewModeFormControlViewModeFormControlViewMode.FormGroup only(when controlType is set to 'group'). Gets or Sets the form'group view mode.
GetValueAsync()Task<object>'N/A'Gets the &quot;Value&quot; property as Task&lt;object&gt;. Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render. StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.

Enums

FormControlAction

FormControlAction.Reset
FormControlAction.Submit

FormControlAlign

FormControlAlign.Left
FormControlAlign.Center
FormControlAlign.Right

FormControlControlType

FormControlControlType.Button
FormControlControlType.Boolean
FormControlControlType.ComboBox
FormControlControlType.CheckInput
FormControlControlType.Datetime
FormControlControlType.DropDownList
FormControlControlType.Group
FormControlControlType.Input
FormControlControlType.Label
FormControlControlType.MultiInput
FormControlControlType.MultiComboInput
FormControlControlType.Mask
FormControlControlType.Number
FormControlControlType.Password
FormControlControlType.RadioButton
FormControlControlType.Submit
FormControlControlType.Textarea
FormControlControlType.Template

FormControlLabelPosition

FormControlLabelPosition.Left
FormControlLabelPosition.Top

FormControlViewMode

FormControlViewMode.Null
FormControlViewMode.Accordion
FormControlViewMode.Tabs
FormControlViewMode.Breadcrumb