# Using forms for user input
This guide builds on the [Managing Data](start/start-data "Try it: Managing Data") step of the Getting Started tutorial, [Get started with a basic Angular app](start "Get started with a basic Angular app").
This section walks you through adding a form-based checkout feature to collect user information as part of checkout.
## Define the checkout form model
This step shows you how to set up the checkout form model in the component class.
The form model determines the status of the form.
1. Open `cart.component.ts`.
1. Import the `FormBuilder` service from the `@angular/forms` package.
This service provides convenient methods for generating controls.
1. Inject the `FormBuilder` service in the `CartComponent` `constructor()`.
This service is part of the `ReactiveFormsModule` module, which you've already imported.
1. To gather the user's name and address, use the `FormBuilder` `group()` method to set the `checkoutForm` property to a form model containing `name` and `address` fields.
1. Define an `onSubmit()` method to process the form.
This method allows users to submit their name and address.
In addition, this method uses the `clearCart()` method of the `CartService` to reset the form and clear the cart.
The entire cart component class is as follows:
## Create the checkout form
Use the following steps to add a checkout form at the bottom of the Cart view.
1. At the bottom of `cart.component.html`, add an HTML `