Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions guide/en/start/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ saved in the file `/src/Form/EchoForm.php`:
<?php
namespace App\Form;

class EchoForm
use Yiisoft\FormModel\FormModel;

class EchoForm extends FormModel
{
private string $message = '';

Expand All @@ -36,6 +38,12 @@ class EchoForm
}
```

To inherit from `FormModel` you need to install `form-model` by following commands:

```
composer require yiisoft/form-model
```

The `EchoForm` class has `$message` property and related getter.

## Using the form <span id="using-form"></span>
Expand Down Expand Up @@ -274,12 +282,6 @@ class EchoForm
{
return $this->message;
}

public function getFormName()
{
return (new \ReflectionClass($this))->getShortName();
}

}
```

Expand Down
Loading