If this is the case, you might consider a different tack. Instead of trying to fill in the form, doing the final form POST, using the post method.
To take this approach, you'll need to work out the final structure of the form and what gets posted. Some browser tools might help with this analysis. For example Firefox's plugins include Web Developer (show the form data just before it's posted) and Live HTTP Headers (show the actual post).