The idea was to have Reset button working the same as Submit button - i.e. clearing all fields and updating CGridView via AJAX request without page reload (as in standard forms). In particular the code was:
$('#form-reset-button').click(function()
{
$('#search-form form input, #search-form form select').each(function(i, o)
{
if (($(o).attr('type') != 'submit') && ($(o).attr('type') != 'reset')) $(o).val('');
});
$.fn.yiiGridView.update('pacjenci-grid', {data: $('#search-form form').serialize()});
return false;
});Now, what I want is to have just simple, pure Reset button which clears all the fields and then reloads the whole page (required to update CGridView but not via AJAX call this time, only in normal form process operation).
For this purpose, I commented out gridview update call and return false in above code, but that does not forces reset button to reload whole page. I managed to do so, by changing reset button to another submit button.
Now, it works as I wanted (clears all fields with above code and reload whole page), but the question is, if according to standards and coding practice, can I have two submit buttons in one form?

Help

















