I have a pdf form with a submit button and a PayPal button. Each works fine as a separate button.
If I combine the 'submit a form' and 'run javascript' actions in 1 button, they also work OK, except... where there are required fields which are not filled, the 'submit a form' action brings up a message to fill in the required fields and doesn't submit the form until this is done (as it should) but the js PayPal action connects to PayPal straight away, with (possibly) details still missing or incomplete.
Is there any way to get round this making the PayPal js conditional on the 'correct' submission of the form or should I simply stick to the (less elegant) two button layout?