A
A
AR2017-02-14 14:46:32
Yii
AR, 2017-02-14 14:46:32

Yii2 How to pass a parameter to a form that is generated by CRUD?

Good afternoon.
There is a model, the controller and views of which are made through the crud generator.
The index view has a button <?= Html::a('Create Label', ['create'], ['class' => 'btn btn-success']) ?
> in the form create) parameter ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-02-14
@slo_nik

Good afternoon. In the PS
form Pass a parameter via the GET link. In Create

public function actionCreate($param)
{
   // далее передаёте в вид create, а потом в форму
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question