If you have JavaScript that submits the forms, you have the choice of two ways with WWW::Mechanize:
(easy) Look at the JavaScript code and reprogram that functionality in the Perl code.
(easy to hard) Use JavaScript::Spidermonkey to embed a JavaScript engine in your Perl program and run the Javascript code through that. You will have to supply appropriate wrappers so the browser DOM will be reflected in your WWW::Mechanize script. This can be very hard. See the first option for an alternative.