> For the complete documentation index, see [llms.txt](https://queents.gitbook.io/vilt/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://queents.gitbook.io/vilt/builders/form.md).

# Form

our framework has a form class that can use to set the form type between `modal` or `tabs`, `page` so you can convert a form to multi-steps with just the backend method

### Page View

you can use the form on views when you make it a `page` like

```php
public function form(): FormComponent
{
   return FormComponent::make('page');
}
```

after that use this command to generate your views

```bash
php artisan vilt:views
```

it will generate 3 views for use on the `Resources/views`, you can custom it as you like.

### Tabs View

<figure><img src="https://598543987-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3nnlrjn6TtcCpL6SXFhI%2Fuploads%2FqHvdBgMiMqGvFnFAMH6b%2FScreenshot%202022-10-31%20at%201.23.07%20PM.png?alt=media&amp;token=4b3eb22a-bd2b-41e4-b916-dd19faa9c598" alt=""><figcaption></figcaption></figure>

to build a tabs form you need to use the `Tabs` class with `Form` class on the resource like

```php
public  function form(): FormComponent
{
    return FormComponent::make('tabs')->tabs([
        Tab::make('basic')->label(__('Basic')),
        Tab::make('media')->label(__('Media')),
        Tab::make('amenities')->label(__('Amenities')),
        Tab::make('units')->edit(false)->label(__('Units')),
    ])->label(__('Create Property'))->get();
}
```

and to add the row on the selected tab it's easy to set `->tab()` to the name of the tab

### From Components

we are using rows on every resource we build to manage the form builder and we have a lot of methods and types for these rows
