YesIAm
(Gergs Forex)
June 11, 2016, 3:52pm
1
I’m struggling to figure some of this out myself - i really wish we could get more documentation.
I am just trying to have a resetButton that refreshes the page as well as clears the form fields.
I tried
<?= Html::resetButton('Reset', ['value' => Url::to('index.php?r=sale/index'), 'class' => 'btn btn-default']) ?>
but nothing happens. Please help
sidtj
(sdlins)
June 11, 2016, 5:31pm
2
Why would you want to reset a form if you will refresh the page? If you refresh a page (without submit data) the form will be reset anyway.
PS: ::resetButton() has not an option to make it refresh the page. If you really need this (even seeming a bit strange) you will need to use js.
YesIAm
(Gergs Forex)
June 12, 2016, 12:46pm
3
oh no, this is not a form - its an index page with gridview on it - so the refresh button is for the search fields - which are naturally ActiveForm fields