how to disable button when textinput is empty?

I want to disable button when text input is empty in yii2

can you help me?

thanks

<div class="pemesanan-search thumbnail padding-baru col-sm-6 input">

&lt;?php &#036;form = ActiveForm::begin([


    'action' =&gt; ['menubayar'],


    'method' =&gt; 'get',


]); ?&gt;





&lt;?= &#036;form-&gt;field(&#036;model, 'NO_REKENING') ?&gt;





&lt;?= &#036;form-&gt;field(&#036;model, 'NO_KARTU') ?&gt;





&lt;?= &#036;form-&gt;field(&#036;model, 'NAMA') ?&gt;





&lt;div class=&quot;form-group&quot;&gt;


    &lt;center&gt;&lt;?= Html::submitButton('Cek Kartu Kredit', ['class' =&gt; 'btn btn-default']) ?&gt;&lt;/center&gt;


&lt;/div&gt;





&lt;?php ActiveForm::end(); ?&gt;

</div>

(For those about to reply), OP got the answer here: http://stackoverflow.com/questions/40782650/how-to-disable-button-when-text-input-is-empty-in-yii2