[
[
[email protected]2017-02-23 22:45:38
Yii
[email protected], 2017-02-23 22:45:38

Yii2 how to make a global form?

I am writing applications in Yii2 and at one point there were difficulties. There is a form that is, as it were, global, that is, it should be available on all views. To form a form, you must first make a request to the database and select the necessary variables for it. How can the form be made global so as not to pass variables from each action for its formation and so that it can be displayed in any view.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Abdula Magomedov, 2017-02-23
@ZSarKZ

For such cases, Yii2 has widgets
https://github.com/yiisoft/yii2/blob/master/docs/g...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question