feat: prefill edit form with param's data
This commit is contained in:
parent
9193ab8e6d
commit
c98ab0988d
|
@ -35,6 +35,12 @@ class ListController extends \yii\web\Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$model = new ParameterForm();
|
$model = new ParameterForm();
|
||||||
|
if ($parameter) {
|
||||||
|
$model->setAttributes([
|
||||||
|
'title' => $parameter->title,
|
||||||
|
'type' => $parameter->type,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($request->isPost) {
|
if ($request->isPost) {
|
||||||
$data = $request->post();
|
$data = $request->post();
|
||||||
|
|
Loading…
Reference in New Issue