--- signup.module	Thu May 10 02:30:30 2007
+++ signup_new.module	Thu Jun 14 14:53:39 2007
@@ -179,10 +179,24 @@
     );
   
   }
-  else {  // !$may_cache: dynamic menu items
+  else {  // !$may_cache: dynamic menu items	
     // Include other php code that we need when not serving cached pages:
     include_once(drupal_get_path('module', 'signup') . '/signup.theme');
 
+
+	//Workaround for multiple forms on one page
+	if($_POST['op'] == 'Sign up'){
+		$who_what = array('nid'=> substr($_POST['form_id'], 11), 'uid' => $user->uid);
+		$merged = array_merge($_POST['signup_form_data'], $who_what);
+		signup_form_submit($form_id, $merged);
+	}
+	//Workaround for multiple forms on one page
+	if($_POST['op'] == 'Cancel Signup'){
+		$nid = substr($_POST['form_id'], 18);
+  	signup_cancel_signup($user->uid, $nid, NULL);
+	}
+
+
     // User signup schedule callback
     $items[] = array(
       'path' => 'user/'. arg(1) .'/signups',
@@ -556,7 +570,7 @@
       // If this is a signup node, start checks for what's to be printed.
       // Only include any of this if we're trying to view the node as
       // a page, not during the view from comment validation, etc.
-      if ($node->signup && $page && !in_array(TRUE, $suppress)) {
+      if ($node->signup && !in_array(TRUE, $suppress)) {
         global $user;
 
         // The node has been closed for signups, and the user has
@@ -611,7 +625,9 @@
             // User isn't signed up, so check to make sure they have signup
             // permissions, and if so, print the themed signup form.
             if (user_access('sign up for content')) {
-              $output = drupal_get_form('signup_form', $node, $anon_signup_form);
+						
+							//Make this form unique w/nid
+              $output = drupal_get_form('signup_form' . $node->nid, $node, $anon_signup_form);
             }
           }
           else {
@@ -660,7 +676,7 @@
   if (!empty($rows)) {
     $output .= theme('table', $header, $rows);
   }
-  $output .= drupal_get_form('signup_form_cancel', $node);
+  $output .= drupal_get_form('signup_form_cancel' . $node->nid, $node);
   return $output;
 }
 
@@ -1407,10 +1423,11 @@
  * Implementation of hook_forms().
  */
 function signup_forms() {
+global $user;
   $args = func_get_args();
   $args = $args[0];
   $form_id = array_shift($args);
-  if (strpos($form_id, 'signup_user_cancel_form') !== FALSE) {
+  if (strpos($form_id, 'signup_user_cancel_form') === FALSE) {
     if ($form_id == 'signup_user_cancel_form_' . $args[0]) {
       array_shift($args);  // Get rid of the extra uid arg.
       $forms[$form_id] = array(
@@ -1420,6 +1437,17 @@
       return $forms;
     }
   }
+	
+	if (strpos($form_id, "signup_form") === 0) {
+	  $forms[$form_id] = array('callback' => 'signup_form');
+	}
+	if (strpos($form_id, "signup_form_cancel") === 0) {
+		$who_what = array('nid'=> substr($_POST['form_id'], 18), 'uid' => $user->uid);
+	  $forms[$form_id] = array(
+		 'callback' => 'signup_user_cancel_form',
+     'callback arguments' => $who_what);
+	}
+ 	return $forms;
 }
 
 function signup_user_cancel_form($nid, $uid, $anon_mail) {
