New to Kendo UI for AngularStart a free 30-day trial

FormField Appearance

The FormField component provides a flexible and customizable way to arrange form field controls inside a form.

Use the colSpan property to control how many columns a form field should span within the Form or FormFieldSet. This allows you to create complex layouts that adapt to different screen sizes and resolutions.

The colSpan property accepts:

  • a number that defines how many columns the form field should span. For example, if you want to create a field that spans two columns from the Form or FormFieldSet, you can set colSpan to 2.
    html
    <!-- Divide the form into 6 columns -->
    <form kendoForm [formGroup]="form" cols="6">
         <!-- Span across 2 columns of the form. -->
        <kendo-formfield [colSpan]="2"> ... </kendo-formfield>
        <kendo-formfield [colSpan]="2"> ... </kendo-formfield>
    </form>
  • an array of ResponsiveFormBreakPoint objects that define how many columns the form field should span for different screen sizes.
    html
    <form kendoForm [formGroup]="form" cols="6">
      <kendo-formfield [colSpan]="spannedColumns"> ... </kendo-formfield>
      <kendo-formfield [colSpan]="spannedColumns"> ... </kendo-formfield>
    </form>

The following example demonstrates how to set the colSpan property in the FormField component. Use the Splitter to resize the form and see how the form fields spans across the columns on different screen sizes.

Change Theme
Theme
Loading ...
In this article
Suggested Links
Not finding the help you need?
Contact Support