Name | Type | Default | Description |
Columns | int | 1 | Defines or retrieves the number of columns used to arrange form fields, determining how fields are organized and displayed within the form layout. |
Controls | IEnumerable<IControl> | N/A | Gets or sets the collection of form controls associated with the form. This allows you to retrieve the current controls or update them with a new set of controls. |
OnStatusChanges | Action<object> | N/A | Callback function invoked when the status changes. The status parameter passed to the function reflects the new state of the process, and can be one of the following string values: 'disabled', 'invalid', 'pending', or 'valid'. Use this callback to handle logic based on each specific status transition. |
OnValueChanges | Action<object> | N/A | Callback function invoked when the form's value changes. Receives the updated form data as a JSON object argument, allowing you to handle or process the new values within your application. |
LabelPosition | FormLabelPosition | FormLabelPosition.Left | Defines or retrieves the position of the labels relative to their associated elements. Specify this property to control where labels are displayed (e.g., above, below, left, or right of the element). |
Readonly | bool | false | Sets all form fields to read-only mode, preventing users from modifying their input while still allowing them to view the existing data. |
ShowColonAfterLabel | bool | false | Controls the visibility of the colon character that appears after label text. When enabled, a colon is displayed after each label; when disabled, the colon is omitted. |
ShowSummary | bool | true | Toggles the visibility of the validation summary, allowing users to display or hide a list of validation errors based on form input. |
Status | object | N/A | Retrieves the current status of the Form. Each entry within the status object contains the following boolean properties: dirty (indicates if the form field has been modified), untouched (indicates if the field has not been focused by the user), and disabled (indicates if the field is currently disabled). |
Value | object | N/A | Retrieves or assigns the current value of the form. Use this property to access the form's data for processing or to update the form with new values programmatically. |
ValidateOnLoad | bool | false | Automatically triggers form validation immediately upon form initialization, ensuring that all form fields are checked for correctness as soon as the form is rendered or instantiated. |
Name | Type | Arguments | Description |
AddControl | void | object controlOptions | Inserts a new control element, such as an input field, button, or checkbox, into the Form, allowing users to interact with and submit data.Args: object controlOptions - Control options. The control options description is available in the "controls" property. |
GetControl | Control | string dataField | Retrieves a specific control element from the form using its name attribute, as defined by the dataField parameter. This method enables direct access to the control's properties and methods for further manipulation or data retrieval.Args: string dataField - dataField of a FormControl or FormGroup |
GetValueAsync() | Task<object> | 'N/A' | Gets the "Value" property as Task<object>. |
InsertControl | void | int index, object controlOptions | Adds a new control element to the Form, allowing users to dynamically extend the form’s functionality. This method enables the inclusion of input fields, buttons, dropdowns, or other interactive components within the Form, ensuring seamless integration and consistent behavior with existing controls.Args: int index - Control insert index,object controlOptions - Control options. The control options description is available in the "controls" property. |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
RemoveControl | void | object controlOptions | Removes a specified control element from the Form, ensuring it is no longer rendered or managed as part of the Form's structure and behavior.Args: object controlOptions - Control options. The control options description is available in the "controls" property. |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
Reset | void | N/A | Resets all fields in the form to their initial, default values, effectively clearing any user input or changes made. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |
Submit | void | object submitOptions | Triggers the submission of the form, sending the user-entered data to the specified server endpoint for processing. This action may also initiate form validation and execute any associated event handlers before transmitting the data.Args: object submitOptions - Sets the submit options object. The object may have the following properties: "async", "action", "target", "method". "async" determines whether the form will be submitted asynchronously. "action" determines the submit url, "method" sets whether the submit is through 'GET' or 'POST'. "target" determines the submit target. |
Submit | void | N/A | Triggers the submission of the form, sending the user-entered data to the specified server endpoint for processing. This action may also initiate form validation and execute any associated event handlers before transmitting the data. |
Validate | void | N/A | Performs comprehensive validation of the form fields, ensuring that all required inputs are provided, data types and formats are correct, and any specified constraints or validation rules are met before allowing form submission. |
ControlControlType.Button |
ControlControlType.Boolean |
ControlControlType.ComboBox |
ControlControlType.CheckInput |
ControlControlType.Datetime |
ControlControlType.DropDownList |
ControlControlType.Group |
ControlControlType.Input |
ControlControlType.Label |
ControlControlType.MultiInput |
ControlControlType.MultiComboInput |
ControlControlType.Mask |
ControlControlType.Number |
ControlControlType.Password |
ControlControlType.RadioButton |
ControlControlType.Submit |
ControlControlType.Textarea |
ControlControlType.Template |
ControlControlControlType.Button |
ControlControlControlType.Boolean |
ControlControlControlType.ComboBox |
ControlControlControlType.CheckInput |
ControlControlControlType.Datetime |
ControlControlControlType.DropDownList |
ControlControlControlType.Group |
ControlControlControlType.Input |
ControlControlControlType.Label |
ControlControlControlType.MultiInput |
ControlControlControlType.MultiComboInput |
ControlControlControlType.Mask |
ControlControlControlType.Number |
ControlControlControlType.Password |
ControlControlControlType.RadioButton |
ControlControlControlType.Submit |
ControlControlControlType.Textarea |
ControlControlControlType.Template |
Name | Type | Default | Description |
Append | string | "" | HTML Content displayed after the Form Control |
ControlOptions | object | null | JSON 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. |
ControlType | ControlControlType | ControlControlType.Input | The type of the control. |
Columns | int | 1 | Sets the Form Group columns. |
ColumnSpan | int | 1 | Sets the Form control column span. |
Controls | IEnumerable<IControlControl> | null | |
DataField | string | "" | 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. |
Disabled | bool | false | Sets the Form control disabled mode. |
Dirty | bool | false | Gets whether the Form control is 'dirty' i.e its value is changed by the user. |
Info | string | "" | Gets or Sets the Form control's info icon's tooltip. |
Invalid | bool | false | Gets whether the Form control is invalid. |
Label | string | "" | Gets or Sets the Form control's label. |
LabelPosition | ControlLabelPosition | ControlLabelPosition.Left | Gets or Sets the Form control's label position. |
LabelOffset | int | 10 | Gets or Sets the offset between the label and the control. |
LabelAlign | string | "left" | FormGroup 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. |
NextButtonLabel | string | "Next" | FormGroup only(when controlType is set to 'group'). Gets or Sets the next button label. |
BackButtonLabel | string | "Back" | FormGroup only(when controlType is set to 'group'). Gets or Sets the back button label. |
Prepend | string | "" | HTML Content displayed before the Form Control |
Readonly | bool | false | Gets or Sets the Form control readonly mode. |
Untouched | bool | false | Gets 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 |
Placeholder | string | "" | Gets or Sets the placeholder. |
ShowButtons | bool | false | FormGroup 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. |
Value | object | null | Sets or Gets the Form control or Form group value. |
Valid | bool | false | Gets whether the Form control is valid. |
ValidationRules | IEnumerable<object> | null | Sets 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. |
ViewMode | ControlViewMode | ControlViewMode.Null | FormGroup only(when controlType is set to 'group'). Gets or Sets the form'group view mode. |
Name | Type | Default | Description |
Append | string | "" | HTML Content displayed after the Form Control |
ControlOptions | object | null | JSON 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. |
ControlType | ControlControlControlType | ControlControlControlType.Input | The type of the control. |
Columns | int | 1 | Sets the Form Group columns. |
ColumnSpan | int | 1 | Sets the Form control column span. |
DataField | string | "" | 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. |
Disabled | bool | false | Sets the Form control disabled mode. |
Dirty | bool | false | Gets whether the Form control is 'dirty' i.e its value is changed by the user. |
Info | string | "" | Gets or Sets the Form control's info icon's tooltip. |
Invalid | bool | false | Gets whether the Form control is invalid. |
Label | string | "" | Gets or Sets the Form control's label. |
LabelPosition | ControlControlLabelPosition | ControlControlLabelPosition.Left | Gets or Sets the Form control's label position. |
LabelOffset | int | 10 | Gets or Sets the offset between the label and the control. |
LabelAlign | string | "left" | FormGroup 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. |
NextButtonLabel | string | "Next" | FormGroup only(when controlType is set to 'group'). Gets or Sets the next button label. |
BackButtonLabel | string | "Back" | FormGroup only(when controlType is set to 'group'). Gets or Sets the back button label. |
Prepend | string | "" | HTML Content displayed before the Form Control |
Readonly | bool | false | Gets or Sets the Form control readonly mode. |
Untouched | bool | false | Gets 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 |
Placeholder | string | "" | Gets or Sets the placeholder. |
ShowButtons | bool | false | FormGroup 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. |
Value | object | null | Sets or Gets the Form control or Form group value. |
Valid | bool | false | Gets whether the Form control is valid. |
ValidationRules | IEnumerable<object> | null | Sets 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. |
ViewMode | ControlControlViewMode | ControlControlViewMode.Null | FormGroup only(when controlType is set to 'group'). Gets or Sets the form'group view mode. |