Modify user filter form in user list page

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
cithukyaw's picture

Hello,

I'd like to hide all the submit buttons in user filter form and submit the form in select onchange event.

I attach js function to role select :

$form['filters']['status']['role']['#attributes'] = array('onchange' => 'myJsFunction();');

And submit the form in javascript like :

$('#user-filter-form').submit();

The form is successfully submitted when I choose value from role select.

The problem is, it won't run user_filter_form_submit() function like clicking submit button.

What do I need to do?