views_row_selector module - capturing a form submission I am using the views_row_selector module to add checkboxes to a table created in Views

The hook_menu $item looks like this

$items['admin/structure/account'] = array(
    'title' =&gt; 'Accounts',
    'description' =&gt; 'Names and addresses',
    'page callback' =&gt; 'views_embed_view',
    'page arguments' =&gt; array('accounts_view'),
    'access arguments' =&gt; array('administer booking'),
);


Everything works perfectly, but how do I capture the form submission?
When using this module you need to write custom code to include a submit handler and use the results. See my inline Issue Queue links where the module maintainer describes this. This is code from a toy example i have sitting around:

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  // As per this issue responded to by the module author, we need to add our
  // own submit button and handler to make use of the data
  // selected in views row selector.
  //
  // https://www.drupal.org/node/1898842#comment-6984976
  if ($form_id === 'views_form_identity_search_page') {

    $search_had_results =
            count($form_state['build_info']['args'][0]-&gt;result) &gt; 0;
    if ($search_had_results) {
      // some custom tasks I make up that could use the results as
      // arguments. Ideally these paths are Rules, Views or hook_menu stuff.
      $my_tasks = array(
        '/foo/bar' =&gt; 'report 1',
        '/foo/baz' =&gt; 'report 2',
        '/foo/bak' =&gt; 'report 3',
      );

      #$form['views_row_selector']['#required'] = TRUE;

      // Some magic to make horizontal form elements.
      // http://drupal.stackexchange.com/questions/7954/horizontal-form-elements
      $form['actions']['#attributes']['class'][] = 'container-inline';
      $form['actions']['my-task'] = array(
        '#type' =&gt; 'select',
        '#title' =&gt; t('Task to Perform'),
        '#options' =&gt; $my_tasks,
        '#weight' =&gt; -5,
        '#required' =&gt; TRUE,
      );

      $form['actions']['submit']['#value'] = t('Perform Action');
      $form['actions']['submit']['#submit'][] = 'ucsb_identity_selection_form_submit';
    } else {
      $form['actions']['#access'] = FALSE;
    }
  }
}


function MY_FORM_ID_form_submit($form, &amp;$form_state) {
#  dpm($form_state, __FUNCTION__);
  $ids = array_filter($form_state['values']['views_row_selector']);
  // take the results, compact them as "1,2,3" for example and perhaps
  // redirect to a new Views page setup to use Contextual Filters
  // with arguments.
  $ids = @implode(',', $ids);
  $options = array('query' =&gt; array('identity_results' =&gt; $ids));
  drupal_goto('custom-user-diagnostics', $options);
}


good luck!