Technically, your example is not valid HTML. In the long run, you can best rework this code to remove your “technical debt”. (See “Should not contain other form elements” in the element prohibition section of the W3C site for XHTML 1.0)
In the meantime, you can try submitting a nested form using jQuery .
1. Replace the submit button
<button class="submit-button" id="submit-button">Submit Payment</button>
2. Change the form tag
<form id="nested-form" target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
3. Submit a form using jQuery
<script type="text/javascript"> $('#submit-button').live('click',function() { $('#nested-form').submit(); }); </script>
I have not had the opportunity to verify this, so please check and let me know if this works for you.
source share