How do I create a form in a modal dialog with Drupal 7?
A good example for using forms on modal dialogs is in Ajax Login/Register module. You could see the module code and understand how it works(ajax_register is using ctools_modal).

Or you can render the form manually and use ctools only for the responses. For example:

mymodule.module:

function mymodule_form($form, &amp;$form_state) {
  ...
  ctools_include('ajax');
  ctools_add_js('ajax-responder');

  $form['#prefix'] = '&lt;div id="container"&gt;';
  $form['#suffix'] = '&lt;/div&gt;';
  $form['actions']['submit']['#ajax'] = array(
    'callback' =&gt; 'mymodule_ajax_callback',
    'wrapper' =&gt; 'container',
  );
  ...
}

function mymodule_ajax_callback($form, $form_state) {
  if (!form_get_errors()) {
    $commands   = array();
    $commands[] = ctools_ajax_command_reload();

    return array('#type' =&gt; 'ajax', '#commands' =&gt; $commands);
  }

  return $form;
}


Now, you can anywhere render this form and show popup (using Twitter Bootstrap or Lightbox):

&lt;a href="#container" data-toggle="modal"&gt;Show Form&lt;/a&gt;
&lt;div style="display:none;"&gt;&lt;?php print drupal_render(drupal_get_form('mymodule_form')); ?&gt;&lt;/div&gt;