Yii2, gridview can not show some html tags inside cells

I’m using GridView widget for displaying data in my Yii2 application. The gridview can not render some of html tags, such as <input> or <button>!.

here is part of my code:


[

     "label" => "Action",

     "format" => 'html',

     "value" => function($data){

           return '<input type="button" value="Action" />';

      }

]

This renders nothing inside <td>, just empty <td></td> !!

What’s the problem?

use ‘format’ => ‘raw’.




[

     "label" => "Action",

     "format" => 'raw',

     "value" => function($data){

           return '<input type="button" value="Action" />';

      }

]