--- ../ahah_helper.module	2009-02-14 16:48:36.000000000 +0100
+++ ahah_helper.module	2010-01-04 07:29:38.444770112 +0100
@@ -4,7 +4,7 @@
 
 define('AHAH_HELPER_CALLBACK_PATH', 'ahah_helper/');
 define('AHAH_HELPER_PARENTS_ENTIRE_FORM', '<form>');
-
+define('AHAH_HELPER_GENERIC_VALIDATE', 'ahah_helper_generic_validate');
 
 // REMARK: drupal_rebuild_form prevents $form_state['values'] from being
 // available to the form. Which means everything will have to be set in and
@@ -72,7 +72,11 @@ function ahah_helper_path($form_item = F
  */
 function ahah_helper_register(&$form, &$form_state) {
   static $js_file_added;
-
+  // If we are on a node-form, please add our generic validation callback!
+  if (($form['#id']=='node-form')
+       && (!in_array(AHAH_HELPER_GENERIC_VALIDATE, $form['#validate']))) {
+    $form['#validate'][] = AHAH_HELPER_GENERIC_VALIDATE;
+  }
   // This is an AHAH-driven form, so enable caching.
   $form['#cache'] = TRUE;
 
@@ -104,6 +108,16 @@ function ahah_helper_register(&$form, &$
 }
 
 /**
+ * Generic validate callback: when we are on a node-form, we need this to
+ * register again our helper functions. Otherwise the ahah_helper.js will not
+ * be reloaded and our ahah for will stop to work..
+ */
+function ahah_helper_generic_validate($form, &$form_state) {
+  // Please register again :)
+  ahah_helper_register($form, $form_state);
+}
+
+/**
  * Submit callback; for any button that's used when JS is disabled (i.e. to
  * trigger an update of the displayed fields: add/remove fields).
  */
