Instead of taking the user to a different page to send the node, I'd like to be able to include the send form at the bottom of the node page. Is there a way to do this? I had started to play with the idea of adding a custom module to create a block that would then load in the form, but I keep running into problems -- the form generation code is a bit beyond my reach.

Below is the contents of my module file, but I keep on getting this error when I visit the page that has the block on it.

Thank you!

[27-Mar-2014 15:56:47] PHP Fatal error: Call to a member function setValues() on a non-object in /var/www/dev.imentor.org/sites/all/modules/send/includes/send.form.inc on line 148

function im_ecard_block($op = 'list', $delta = 0, $edit = array()) {

  // LIST
  if ($op == 'list') {
    $blocks = array();
    $blocks['send_form']['info'] = t('Send Form');
    return $blocks; 
  }
  
  // VIEW
  else if ($op == 'view') {
    switch($delta) {
    
      case 'send_form':
      
        if (user_access('send_access')) {
          $block['subject'] = t('Send eCard');
          $arg1 = intval(arg(1));

          if (!is_null(module_load_include('inc', 'send', 'includes/send.api'))) {
            die('Failed to load includes/send.api.inc file');
          }
          if (!is_null(module_load_include('inc', 'send', 'includes/handlers/send'))) {
            die('Failed to load includes/handlers/send.inc file');
          }
          if (!is_null(module_load_include('inc', 'send', 'includes/send.form'))) {
            die('Failed to load includes/send.form.inc file');
          }

          if (function_exists('send_form') && ($arg1 > 0)) {
            $profile = send_profile_load('send_node');
            $send_form = send_form($form_state, $profile, $arg1);
            $block['content'] = drupal_get_form('send_form', a$send_form);
          }
        }
        
        break;
    }
    
    return $block;
  }
}