Forms Support
The Kendo UI Form component integrates with Angular's powerful form handling capabilities, supporting both Template-driven and Reactive forms. This integration provides a consistent and professional user experience while using Angular's built-in form validation and data binding features.
When deciding between template-driven and reactive forms, consider the following factors:
Template-Driven Forms | Reactive Forms |
---|---|
Building simple forms with straightforward validation requirements | Building complex forms with advanced validation logic |
Working with small to medium-sized forms | Need dynamic form generation or modification |
Preferring a more declarative, template-centered approach | Implementing multi-step forms or wizards |
Rapid prototyping or quick form implementation | Need for comprehensive unit testing of form logic |
Team members know template-driven development better | Working with large-scale enterprise applications |
Handling complex data transformations or cross-field validation |
Reactive Forms
Reactive forms, also known as model-driven forms, provide a programmatic approach to form handling, offering greater control over form state, validation, and user interactions. The Kendo UI Form component works with Angular's reactive forms infrastructure.
The following example demonstrates how to use the Form in a reactive form.
Template-Driven Forms
Template-driven forms in Angular use declarative templates and two-way data binding to handle form state and validation. The Kendo UI Form component integrates with this approach, allowing you to define form structure and validation rules directly in your templates.
The following example demonstrates how to use the Form in template-driven forms.