OK, so the problem must be something specific to that form. Since you have it working, it sounds like you only need to find out what the problem was in the old form if you want to. What I would do is start removing things until it works.
>I have already tried to rewrite everything and for some unknown reason the problem disappeared. I think.