--- /Users/oli/Desktop/ahah_forms/examples/todos/todos.module +++ todos_new.module @@ -137,6 +137,10 @@ if( is_array( $edit['items'] ) ) { $items = $edit['items']; } + // If $edit is not empty, it's not our first visit. So we don't load the items stored in the node because they reflect the outdated status without our edits. + elseif( !is_array( $edit['items'] ) && count($edit)) { + $items = array(); + } elseif( is_array($node->items) ) { // todoss have been loaded into node (by apinode:load) $items = $node->items;