I'm not sure if this is a problem specific to this module, or specific to the way I've implemented it. I've basically copied the code from the todos module into my module, and renamed some of the functions.
Unfortunately, when I try and submit to gain todo items in my forms (which I am going to fix later to suit my module), an error message comes up saying that 'mymodule_node_form' does not match 'mynodetype_node_form' and there are bad parameters for my form.
This problem doesn't happen without the Ahah form element, so I assume there is some problem with my implementation of the protocol.
If it is necessary, I'll split my module into two modules, but I feel that there should be a way to handle this.
I'll provide some code example later tonight.
Dave
Comments
Comment #1
starbow commentedI am not really clear on this issue. Maybe it will become clearer after you submit your code.
cheers,
-t
Comment #2
dwees commentedHere is the relevant code:
Comment #3
starbow commentedAh. Your problem is that you are using todo/todo_update_js as the path in your bindings. todo_update_js is not a general submission function. It only works if you are submitting todo forms. You will need to copy that function into your module and adapt it to use your form:
Also, I notice that you are using the #theme = 'todo_items' to establish the 'todos_items_wrapper' wrapper for your dynamic items. This might work, but is a messy way to do it. I would recommend that you copy the theme_todo_items over into your module as theme_screenplay_items and then create and use your own wrapper, such as 'screenplay_items_wrapper'.
The todo.module is an example module, not a utility module. You should not have the string 'todo' show up anywhere in your module.
Comment #4
dwees commentedI was just being lazy and trying to copy over your code, and I guessed I missed an important bit. :)
Dave