VBO Pass Argument to Custom Action Function I have a view that list entities. It has a VBO field on it for executing a few custom actions.

I can get the actions working, but I need to add a field to the operations form on the view which lets the user select a date field. I then need to pass that date value on the VBO form submit, to the custom action, so that I can use it to manipulate some entity data.

I am able to add the date field via this method:

function mymodule_views_bulk_operations_form_alter(&amp;$form, &amp;$form_state, $vbo){
    $form['vbo_set_close_date'] = array (
        '#type' =&gt; 'date_popup',
        '#title' =&gt; t ('Set Close Date'),
        '#date_format' =&gt; 'm/d/Y',
        '#date_label_position' =&gt; 'within',
        '#weight' =&gt; 1000,
    );
}


Now I am stuck because that data doesn't get passed to my custom action, and I'm not sure what the correct method would be to accomplish that. I've though of adding a custom form submit handler, but still not sure if that's working because I can't seem to get it to trigger.
Awhile back I did come up with a work around for this. Basically you can create a custom submission handler for the VBO form, then have that custom handler perform the code you need.

/**
* Implements hook_views_bulk_operations_form_alter().
*
* This is the function that alters our VBO form
*
* @param $form
* @param $form_state
* @param $vbo
*/
function mymodule_views_bulk_operations_form_alter(&amp;$form, &amp;$form_state, $vbo){

  // Here I added a date popup to the form
  $form['vbo_set_close_date'] = array (
        '#type' =&gt; 'date_popup',
        '#title' =&gt; t ('Set Close Date'),
        '#date_format' =&gt; 'm/d/Y',
        '#date_label_position' =&gt; 'within',
        '#weight' =&gt; -10000,
  );

  // Here is where I added the custom submission handler. This calls the "mymodule_set_close_dates" method
  $form['select']['submit']['#submit'][] = "mymodule_set_close_dates";

}

/**
 * Callback function for VBO form
 *
 * @param $form
 * @param $form_state
 */
function mymodule_set_close_dates($form, &amp;$form_state){

  $date = $form_state['values']['vbo_set_close_date'];
  $action = $form_state['operation']-&gt;operationId;
  if(!is_null($date) &amp;&amp; $action == 'action::mymodule_close_job'){ // &lt;------- custom action
      $value = strtotime($date);
      $relations = $form_state['build_info']['args'][0]-&gt;result;
      foreach ($relations as $relation){
        $rid = $relation-&gt;rid;
        $wrapper = entity_metadata_wrapper('relation', $rid);
        $wrapper-&gt;field_ended-&gt;set($value);
        $wrapper-&gt;save();
    }
}