M
M
Mikha Pankratov2015-03-30 15:37:54
Yii
Mikha Pankratov, 2015-03-30 15:37:54

How to make a button with a picture in Yii2 ActiveForm?

Hello guys.
I'm uploading pictures. Made it simple..

<?=$form->field($model, 'image')->fileInput()->label(false)->error(false); ?>

but it is necessary
<button class="myclass"><i class="myclass2"></i>Добавить фото</button>

Can anyone tell me how to do it? If not difficult with an example.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikha Pankratov, 2015-04-01
@frmax

I figured it out using Css, thanks widget is cool. I will use it in another project.

D
Dmitry Bay, 2015-03-30
@kawabanga

demos.krajee.com/widget-details/fileinput try this addon.
In general, what you want is more of a js dependency.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question