kartik-v / yii2-widgets

Collection of useful widgets for Yii Framework 2.0
http://demos.krajee.com/widgets
Other
558 stars 175 forks source link

file-preview div is still showing even though elPreviewContainer is changed #338

Open ishitat opened 7 years ago

ishitat commented 7 years ago

Below is my code. I have change preview container id as well as image container id. But in the plugin, I can see the empty file-preview class. This is distorting my view. What should I do ?

<?php
           echo $form->field($model, 'resume')->widget(FileInput::classname(), [
              'pluginOptions' => array_merge(Yii::$app->params['filepluginOptions'], [
              'elPreviewContainer' => '#resumeajex',
              'elPreviewImage' => '#resumeajex',
              'initialPreview' =["http://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/FullMoon2010.jpg/631px-FullMoon2010.jpg"],
             'initialPreviewAsData' => true,
                                    ]),
              'options' => ['accept' => Yii::$app->params['doc_pdf_mimetype']],
             ]);
 ?>
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/59858391-file-preview-div-is-still-showing-even-though-elpreviewcontainer-is-changed?utm_campaign=plugin&utm_content=tracker%2F530581&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F530581&utm_medium=issues&utm_source=github).