W
W
warcevil2016-12-05 18:29:42
Yii
warcevil, 2016-12-05 18:29:42

Why doesn't yii2-widget-fileinput work?

Guys tell me pliz, I do not understand what the problem is. I installed the kartik-v/yii2-widget-fileinput component and put it on the field. Everything works fine, I set it up as it should. But firstly, for some reason, if there are 2 fields with this component, then the file is not loaded. And I also put him on the field from another view, but he doesn’t fuss there either. Here is the code
<?= $form->field($model, 'image')->widget(FileInput::classname(), [
'options' => ['accept' => 'image/*'],
]) ;?>
The image variable is not coming. If according to the standard:
<?= $form->field($model, 'image')->fileInput();
then everything works. I repeat that in another place everything turned out fine, but here there is some kind of jamb.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Максим Тимофеев, 2017-04-25
@webinar Куратор тега Yii

Записывал видео на тему настройки yii2-widget-fileinput:

  • про загрузку фото
  • конкретно про yii2-widget-fileinput

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question