HxFormValue

Displays a read-only value in the form control visual (as .form-control, with label, border, etc.).

Basic Usage

Value
<HxFormValue Label="Label" Value="Value" />

Custom Content

You can render any custom content using the ValueTemplate.

Bad value

Input Groups

Text or custom HTML can be added to the start or to the end of an input through InputGroups. Learn more here.

$
Value
.00

API

Parameters

Name Type Description
CssClass string Custom CSS class to render with wrapping div.
Label string Label to render before input (or after input for Checkbox).
LabelTemplate RenderFragment Label to render before input (or after input for Checkbox).
LabelCssClass string Custom CSS class to render with the label.
Hint string Hint to render after input as form-text.
HintTemplate RenderFragment Hint to render after input as form-text.
Value string Value to be presented.
ValueTemplate RenderFragment Template to render value.
ValueCssClass string Custom CSS class to render with the value.
InputGroupStartText string Input-group-text at the beginning of the input. In comparison to IFormValueComponentWithInputGroups.InputGroupStartTemplate this property is rendered as .input-group-text.
InputGroupStartTemplate RenderFragment Input-group at the beginning of the input.
InputGroupEndText string Input-group-text at the end of the input. In comparison to IFormValueComponentWithInputGroups.InputGroupEndTemplate this property is rendered as .input-group-text.
InputGroupEndTemplate RenderFragment Input-group at the end of the input.

Methods

Method Returns Description
RenderValue(RenderTreeBuilder builder) void Renders content of the component (value, input).
An unhandled error has occurred. Reload 🗙