These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Conditional submission possible?

DavidCouper
Registered: Apr 2 2011
Posts: 7

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?

My Product Information:
Acrobat Pro 8.2.6, Windows
George_Johnson
Online
Expert
Registered: Jul 6 2008
Posts: 1876
What you can do is replace the submit form action with the equivalent JavaScript code. The code could first check the required fields, and if everything is OK, go ahead with the submit and the PayPal stuff.