How can I implement a form into a DC view footer? I am trying to make a shipping quote module for Drupal Commerce (DC) and I am trying to do it within the DC cart view footer by sending a form within a view. 

I have done quite a bit of research and just can't seem to find the answer. The place I am now is trying to do it with a views handler. However, I can't even get the handler to show up in the footer add options. 

My current .module code: 

&lt;?php
function MY_MODULE_form($form, &amp;$form_state) {
  $form = array();

  //Zip Code
  $form['zip_code'] = array(
'#title' =&gt; '',
'#type' =&gt; 'textfield',
'#field_prefix' =&gt; t('Zip Code:'),
'#maxlength' =&gt; 5,
'#size' =&gt; 5,
  );

  //Shipping Select
  $form['carrier_select'] = array(
    '#type' =&gt; 'select',
    '#options' =&gt; array(
      'null' =&gt; 'Select Shipping',
      'ups_ground' =&gt; 'UPS Ground',
      'usps_priority' =&gt; 'USPS Priority'),
      '#ajax' =&gt; array(
      'callback' =&gt; 'MY_MODULE_form_callback',
    ),
    '#suffix' =&gt; '&lt;div id="commerce_ups_ship_price"&gt;&lt;/div&gt;',
  );

  $form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('submit'),
  );
  return $form;
}

/**
 * Ajax callback triggered by select.
 */
function MY_MODULE_form_callback($form, $form_state) {
  require_once(DRUPAL_ROOT . '/sites/all/modules/commerce_shipping/modules   /MY_MODULE/includes/plugins/ups/fd_getrate.php');
  $commands = array();
  $commands[] = ajax_command_html('#commerce_ups_ship_price',    get_ups($form_state['values']['zip_code']));
  $commands[] = ajax_command_data('#commerce_ups_ship_price', 'form_state_value_select', $form_state['values']['zip_code']);
  return array('#type' =&gt; 'ajax', '#commands' =&gt; $commands);
}

/**
 * Implementation of hook_views_api
 */
function MY_MODULE_views_api() {
  return array(
    'api' =&gt; 3,
    'path' =&gt; drupal_get_path('module', 'MY_MODULE') . '/includes/views',);
}
?&gt;


Plus .inc for the view handler:

class MY_MODULE_shipping_form extends views_handler_area {

  function option_definition() {
    $options = parent::option_definition();

    // TODO: Update with options

    return $options;
  }

  function options_form(&amp;$form, &amp;$form_state) {
    parent::options_form($form, $form_state);

    unset($form['empty']);

    // TODO: Update with options
  }

  function render($values) {
    return drupal_render(drupal_get_form('MY_MODULE_form'));
  }
}


Plus the .inc for views:

function MY_MODULE_views_data() {
  $data = array();
  // Define an footer handler for displaying shipping quotes.
  $data['MY_MODULE']['handler'] = array(
     'handler' =&gt; 'MY_MODULE_shipping_form',
     'title' =&gt; t('Shipping API Quotes'),
     'help' =&gt; t('Display a user input form to allow the retrieval of shipping quotes.'),
  );

  return $data;
}


On this last one I don't have a clue of what I am doing. 

Anyone who can help me on this one?

FYI - I am using Commerce Kickstart + Views3
You might want to consider using the Commerce Shipping module to handle the integration to Drupal Commerce, it doesn't support adding the shipping quote form in the cart footer, but it would help in handling the actually shipping quote with commerce.

The problem you are facing is in the hook_views_data, you should do something like this:

function MY_MODULE_views_data() {
  $data = array();
  // Define an footer handler for displaying shipping quotes.
  $data['MY_MODULE']['shipping_footer'] = array(
    'title' =&gt; t('Shipping API Quotes'),
    'help' =&gt; t('Display a user input form to allow the retrieval of shipping quotes.'),
    'area' =&gt; array(
      'handler' =&gt; 'MY_MODULE_shipping_form',
    ),
  );

  return $data;
}


You need to define an area handler as shown above, that should let you select the form in the views UI.