Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenFormField

    A Blazor component that wraps another component and adds a label, helper text, start and end content.

    Inheritance
    System.Object
    RadzenComponent
    RadzenFormField
    Implements
    IDisposable
    Inherited Members
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, Int32)
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.OnInitialized()
    RadzenComponent.SetParametersAsync(ParameterView)
    RadzenComponent.Reference
    RadzenComponent.OnAfterRenderAsync(Boolean)
    RadzenComponent.RaiseContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.Dispose()
    RadzenComponent.CurrentStyle
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenFormField : RadzenComponent, IDisposable
    Examples
    <RadzenFormField Text="Search">
      <RadzenTextBox @bind-Value="@text" />
    </RadzenFormField>

    Constructors

    RadzenFormField()

    Initializes a new instance of the RadzenFormField class.

    Declaration
    public RadzenFormField()

    Properties

    AllowFloatingLabel

    Gets or sets a value indicating whether the label is floating or fixed on top.

    Declaration
    public bool AllowFloatingLabel { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if floating is allowed; otherwise, false.

    ChildContent

    Gets or sets the child content. The child content is wrapped by the form field. Can be used with RadzenTextBox, RadzenTextArea, RadzenPassword, RadzenDropDown, RadzenDropDownList, RadzenNumeric.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    RenderFragment

    Component

    Gets or sets the name of the form field. Used to associate the label with a component.

    Declaration
    public string Component { get; set; }
    Property Value
    Type Description
    System.String

    End

    Gets or sets the optional content that will be rendered after the child content. Usually used with RadzenIcon.

    Declaration
    public RenderFragment End { get; set; }
    Property Value
    Type Description
    RenderFragment
    Examples
    <RadzenFormField>
      <End>
        <RadzenIcon Icon="search" />
      </End>
      <ChildContent>
        <RadzenTextBox @bind-Value="@text" />
      </ChildContent>
    </RadzenFormField>

    Helper

    Gets or sets the optional content that will be rendered below the child content. Used with a validator or to display some additional information.

    Declaration
    public RenderFragment Helper { get; set; }
    Property Value
    Type Description
    RenderFragment
    Examples
    <RadzenFormField>
      <Helper>
       <RadzenRequiredValidator Component="Text" />
      </Helper>
      <ChildContent>
    .   <RadzenTextBox @bind-Value="@text" Name="Text" />
      </ChildContent>
    </RadzenFormField>

    Start

    Gets or sets the optional content that will be rendered before the child content. Usually used with RadzenIcon.

    Declaration
    public RenderFragment Start { get; set; }
    Property Value
    Type Description
    RenderFragment
    Examples
    <RadzenFormField Text="Search">
      <Start>
        <RadzenIcon Icon="search" />
      </Start>
      <ChildContent>
        <RadzenTextBox @bind-Value="@text" />
      </ChildContent>
    </RadzenFormField>

    Text

    Gets or sets the label text.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    TextTemplate

    Gets or sets the custom content for the label using a Razor template. When provided, this template will be rendered instead of the plain text specified in the Text parameter.

    Declaration
    public RenderFragment TextTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment

    Variant

    Gets or sets the design variant of the form field.

    Declaration
    public Variant Variant { get; set; }
    Property Value
    Type Description
    Variant

    The variant of the form field.

    Methods

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    System.String
    Overrides
    RadzenComponent.GetComponentCssClass()

    OnParametersSet()

    Declaration
    protected override void OnParametersSet()

    Implements

    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT